summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-03-21 05:21:35 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-21 10:16:54 -0700
commitc7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 (patch)
tree2abf4b6c8087a0daec60320bb46b029918f276b4 /include/net/ip6_fib.h
parent67f69513470382b1872b12f0db4446a5ab74389a (diff)
downloadlinux-c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43.tar.gz
linux-c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43.tar.bz2
linux-c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43.zip
ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create
Change addrconf_f6i_alloc to generate a fib6_config and call ip6_route_info_create. addrconf_f6i_alloc is the last caller to fib6_info_alloc besides ip6_route_info_create, and there is no reason for it to do its own initialization on a fib6_info. Host routes need to be created even if the device is down, so add a new flag, fc_ignore_dev_down, to fib6_config and update fib6_nh_init to not error out if device is not up. Notes on the conversion: - ip_fib_metrics_init is the same as fib6_config has fc_mx set to NULL and fc_mx_len set to 0 - dst_nocount is handled by the RTF_ADDRCONF flag - dst_host is handled by fc_dst_len = 128 nh_gw does not get set after the conversion to ip6_route_info_create but it should not be set in addrconf_f6i_alloc since this is a host route not a gateway route. Everything else is a straight forward map between fib6_info and fib6_config. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 84097010237c..2acb78a762ee 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -50,7 +50,8 @@ struct fib6_config {
u32 fc_protocol;
u16 fc_type; /* only 8 bits are used */
u16 fc_delete_all_nh : 1,
- __unused : 15;
+ fc_ignore_dev_down:1,
+ __unused : 14;
struct in6_addr fc_dst;
struct in6_addr fc_src;