diff options
author | David Ahern <dsahern@gmail.com> | 2019-05-25 00:43:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-29 07:37:30 +0300 |
commit | 53010f991a9f5e4ed2db705ddde6ff32709192a2 (patch) | |
tree | f53445ab858d6ad371aaa7b7a8b8c7e391d3f65b /include | |
parent | 597cfe4fc3390a055f42546c254e48601b37009f (diff) | |
download | linux-53010f991a9f5e4ed2db705ddde6ff32709192a2.tar.xz |
nexthop: Add support for IPv6 gateways
Handle IPv6 gateway in a nexthop spec. If nh_family is set to AF_INET6,
NHA_GATEWAY is expected to be an IPv6 address. Add ipv6 option to gw in
nh_config to hold the address, add fib6_nh to nh_info to leverage the
ipv6 initialization and cleanup code. Update nh_fill_node to dump the v6
address.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/nexthop.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/nexthop.h b/include/net/nexthop.h index c0e4b0d92c39..d188f16c0c4f 100644 --- a/include/net/nexthop.h +++ b/include/net/nexthop.h @@ -12,6 +12,7 @@ #include <linux/netdevice.h> #include <linux/types.h> #include <net/ip_fib.h> +#include <net/ip6_fib.h> #include <net/netlink.h> #define NEXTHOP_VALID_USER_FLAGS RTNH_F_ONLINK @@ -31,6 +32,7 @@ struct nh_config { union { __be32 ipv4; + struct in6_addr ipv6; } gw; u32 nlflags; @@ -47,6 +49,7 @@ struct nh_info { union { struct fib_nh_common fib_nhc; struct fib_nh fib_nh; + struct fib6_nh fib6_nh; }; }; |