1
0
Fork 0

soreuseport: change consume_skb to kfree_skb in error case

Fixes: 538950a1b7 ("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>
hifive-unleashed-5.1
Craig Gallek 2016-01-05 10:57:13 -05:00 committed by David S. Miller
parent 1134158ba3
commit 00ce3a15d8
1 changed files with 1 additions and 1 deletions

View 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);