summaryrefslogtreecommitdiffstats
path: root/include/net/nexthop.h
diff options
context:
space:
mode:
authorDavid Ahern2019-05-24 23:43:06 +0200
committerDavid S. Miller2019-05-29 06:37:30 +0200
commit53010f991a9f5e4ed2db705ddde6ff32709192a2 (patch)
treef53445ab858d6ad371aaa7b7a8b8c7e391d3f65b /include/net/nexthop.h
parentnexthop: Add support for IPv4 nexthops (diff)
downloadkernel-qcow2-linux-53010f991a9f5e4ed2db705ddde6ff32709192a2.tar.gz
kernel-qcow2-linux-53010f991a9f5e4ed2db705ddde6ff32709192a2.tar.xz
kernel-qcow2-linux-53010f991a9f5e4ed2db705ddde6ff32709192a2.zip
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/net/nexthop.h')
-rw-r--r--include/net/nexthop.h3
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;
};
};