Skip to content

Commit

Permalink
soreuseport: change consume_skb to kfree_skb in error case
Browse files Browse the repository at this point in the history
Fixes: 538950a ("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>
  • Loading branch information
Craig Gallek authored and David S. Miller committed Jan 6, 2016
1 parent 1134158 commit 00ce3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/sock_reuseport.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 00ce3a1

Please sign in to comment.