aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-03-27 20:53:55 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-29 10:48:04 -0700
commitb75ed8b1aa9c3a99702159c3be8b0c1d54972ae5 (patch)
tree2e2bdeed02ac9433ae71cafe1383525743e15424 /net/core
parentipv6: Change rt6_add_nexthop and rt6_nexthop_info to take fib6_nh (diff)
downloadlinux-dev-b75ed8b1aa9c3a99702159c3be8b0c1d54972ae5.tar.xz
linux-dev-b75ed8b1aa9c3a99702159c3be8b0c1d54972ae5.zip
ipv4: Rename fib_nh entries
Rename fib_nh entries that will be moved to a fib_nh_common struct. Specifically, the device, oif, gateway, flags, scope, lwtstate, nh_weight and nh_upper_bound are common with all nexthop definitions. In the process shorten fib_nh_lwtstate to fib_nh_lws to avoid really long lines. Rename only; no functional change intended. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index e7784764213a..79d319c636ea 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -4634,12 +4634,12 @@ static int bpf_ipv4_fib_lookup(struct net *net, struct bpf_fib_lookup *params,
nh = &res.fi->fib_nh[res.nh_sel];
/* do not handle lwt encaps right now */
- if (nh->nh_lwtstate)
+ if (nh->fib_nh_lws)
return BPF_FIB_LKUP_RET_UNSUPP_LWT;
- dev = nh->nh_dev;
- if (nh->nh_gw)
- params->ipv4_dst = nh->nh_gw;
+ dev = nh->fib_nh_dev;
+ if (nh->fib_nh_gw4)
+ params->ipv4_dst = nh->fib_nh_gw4;
params->rt_metric = res.fi->fib_priority;