summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-08-17 15:07:22 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-17 10:15:53 -0700
commit4d6a75b65dbfa910e84b2cbd7cd54468cf33ff9b (patch)
tree088c702904e1f91995b3ce041527561f2941d81c /net
parent1ab2de2bfed3ab2073ed1e7afa2b1134930d2b70 (diff)
downloadop-kernel-dev-4d6a75b65dbfa910e84b2cbd7cd54468cf33ff9b.zip
op-kernel-dev-4d6a75b65dbfa910e84b2cbd7cd54468cf33ff9b.tar.gz
bpf: no need to nullify ri->map in xdp_do_redirect
We are guaranteed to have a NULL ri->map in this branch since we test for it earlier, so we don't need to reset it here. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/filter.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index e9f8dce..ea3ca34 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2568,7 +2568,6 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp,
fwd = dev_get_by_index_rcu(dev_net(dev), index);
ri->ifindex = 0;
- ri->map = NULL;
if (unlikely(!fwd)) {
bpf_warn_invalid_xdp_redirect(index);
return -EINVAL;
OpenPOWER on IntegriCloud