Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1686285 > unrolled thread
| Started by | Kefeng Wang <wangkefeng.wang@huawei.com> |
|---|---|
| First post | 2017-07-13 08:40 +0200 |
| Last post | 2017-07-13 18:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] bpf: fix return in bpf_skb_adjust_net Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-07-13 08:40 +0200
Re: [PATCH] bpf: fix return in bpf_skb_adjust_net Daniel Borkmann <daniel@iogearbox.net> - 2017-07-13 11:30 +0200
Re: [PATCH] bpf: fix return in bpf_skb_adjust_net David Miller <davem@davemloft.net> - 2017-07-13 18:20 +0200
| From | Kefeng Wang <wangkefeng.wang@huawei.com> |
|---|---|
| Date | 2017-07-13 08:40 +0200 |
| Subject | [PATCH] bpf: fix return in bpf_skb_adjust_net |
| Message-ID | <u2FX4-240-11@gated-at.bofh.it> |
The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, and always return 0, fix it by return 'ret'. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index c7f7370..f44fc22 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2248,7 +2248,7 @@ static int bpf_skb_adjust_net(struct sk_buff *skb, s32 len_diff) bpf_skb_net_grow(skb, len_diff_abs); bpf_compute_data_end(skb); - return 0; + return ret; } BPF_CALL_4(bpf_skb_adjust_room, struct sk_buff *, skb, s32, len_diff, -- 1.8.3.1
[toc] | [next] | [standalone]
| From | Daniel Borkmann <daniel@iogearbox.net> |
|---|---|
| Date | 2017-07-13 11:30 +0200 |
| Message-ID | <u2IBz-3Pg-1@gated-at.bofh.it> |
| In reply to | #1686285 |
On 07/13/2017 08:27 AM, Kefeng Wang wrote: > The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, > and always return 0, fix it by return 'ret'. > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Sigh, yep of course. Thanks! Acked-by: Daniel Borkmann <daniel@iogearbox.net>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-07-13 18:20 +0200 |
| Message-ID | <u2P0m-7Rn-9@gated-at.bofh.it> |
| In reply to | #1686285 |
From: Kefeng Wang <wangkefeng.wang@huawei.com> Date: Thu, 13 Jul 2017 14:27:58 +0800 > The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, > and always return 0, fix it by return 'ret'. > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web