summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid Ahern2019-03-28 04:53:57 +0100
committerDavid S. Miller2019-03-29 18:48:04 +0100
commitf1741730dd18828fe3ea5fa91c22f41cf001c625 (patch)
treed3491ccb4fd5129cc45d364fda8b67f3e056c366 /net/ipv6/route.c
parentipv6: Rename fib6_nh entries (diff)
downloadkernel-qcow2-linux-f1741730dd18828fe3ea5fa91c22f41cf001c625.tar.gz
kernel-qcow2-linux-f1741730dd18828fe3ea5fa91c22f41cf001c625.tar.xz
kernel-qcow2-linux-f1741730dd18828fe3ea5fa91c22f41cf001c625.zip
net: Add fib_nh_common and update fib_nh and fib6_nh
Add fib_nh_common struct with common nexthop attributes. Convert fib_nh and fib6_nh to use it. Use macros to move existing fib_nh_* references to the new nh_common.nhc_*. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e4c2f8e43405..79ef590b7bc5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2906,6 +2906,8 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
int addr_type;
int err;
+ fib6_nh->fib_nh_family = AF_INET6;
+
err = -ENODEV;
if (cfg->fc_ifindex) {
dev = dev_get_by_index(net, cfg->fc_ifindex);
@@ -2999,6 +3001,7 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
set_dev:
fib6_nh->fib_nh_dev = dev;
+ fib6_nh->fib_nh_oif = dev->ifindex;
err = 0;
out:
if (idev)