aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-06-03 20:19:50 -0700
committerDavid S. Miller <davem@davemloft.net>2019-06-04 19:26:49 -0700
commitdcb1ecb50edf8219c3bd851de35897fb024c423b (patch)
tree29cc881d4f6e2d476a296562bdcb21c0f7f515e2 /net/ipv4/route.c
parentipv4: Use accessors for fib_info nexthop data (diff)
downloadlinux-dev-dcb1ecb50edf8219c3bd851de35897fb024c423b.tar.xz
linux-dev-dcb1ecb50edf8219c3bd851de35897fb024c423b.zip
ipv4: Prepare for fib6_nh from a nexthop object
Convert more IPv4 code to use fib_nh_common over fib_nh to enable routes to use a fib6_nh based nexthop. In the end, only code not using a nexthop object in a fib_info should directly access fib_nh in a fib_info without checking the famiy and going through fib_nh_common. Those functions will be marked when it is not directly evident. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 05a6a8ecb574..4a1168451f3a 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1585,7 +1585,7 @@ static void rt_set_nexthop(struct rtable *rt, __be32 daddr,
ip_dst_init_metrics(&rt->dst, fi->fib_metrics);
#ifdef CONFIG_IP_ROUTE_CLASSID
- {
+ if (nhc->nhc_family == AF_INET) {
struct fib_nh *nh;
nh = container_of(nhc, struct fib_nh, nh_common);