soreuseport: change consume_skb to kfree_skb in error case
authorCraig Gallek <kraig@google.com>
Tue, 5 Jan 2016 15:57:13 +0000 (10:57 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 06:30:27 +0000 (01:30 -0500)
Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Craig Gallek <kraig@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock_reuseport.c

index ae0969c0fc2e43553bdb5331d1688374ff665ae1..1df98c55744029de02522e34ed00c3cd2ca03af1 100644 (file)
@@ -173,7 +173,7 @@ static struct sock *run_bpf(struct sock_reuseport *reuse, u16 socks,
 
        /* temporarily advance data past protocol header */
        if (!pskb_pull(skb, hdr_len)) {
-               consume_skb(nskb);
+               kfree_skb(nskb);
                return NULL;
        }
        index = bpf_prog_run_save_cb(prog, skb);