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>
This commit is contained in:
parent
1134158ba3
commit
00ce3a15d8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue