netfilter: nfnetlink_queue: Fix "discards ‘const’ qualifier" warning
authorJon Medhurst <tixy@linaro.org>
Thu, 9 Apr 2015 09:40:50 +0000 (10:40 +0100)
committerJon Medhurst <tixy@linaro.org>
Wed, 15 Apr 2015 10:10:47 +0000 (11:10 +0100)
nfqnl_zcopy can now modify the 'from' sk_buff, so drop the const
qualifier and fix build warnings like:

net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’:
net/netfilter/nfnetlink_queue_core.c:264:15: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type
  if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {

Fixes: c5f0c0e75254 ("core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors")
Signed-off-by: Jon Medhurst <tixy@linaro.org>
net/netfilter/nfnetlink_queue_core.c

index 2b8199f68785d1a8f17cc65049826976d921f7c6..5497f50af2f033fc5e9cfb410b42db1c84d1d6ac 100644 (file)
@@ -228,7 +228,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
 }
 
 static int
-nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen)
+nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
 {
        int i, j = 0;
        int plen = 0; /* length of skb->head fragment */