summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-05-24 14:43:05 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-28 21:37:30 -0700
commit597cfe4fc3390a055f42546c254e48601b37009f (patch)
tree654185d19b811823df503a1d33d1127e667184d6 /include/net
parentab84be7e54fc3d9b248285f1a14067558d858819 (diff)
downloadlinux-597cfe4fc3390a055f42546c254e48601b37009f.tar.bz2
nexthop: Add support for IPv4 nexthops
Add support for IPv4 nexthops. If nh_family is set to AF_INET, then NHA_GATEWAY is expected to be an IPv4 address. Register for netdev events to be notified of admin up/down changes as well as deletes. A hash table is used to track nexthop per devices to quickly convert device events to the affected nexthops. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/nexthop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/nexthop.h b/include/net/nexthop.h
index 18e1f512f866..c0e4b0d92c39 100644
--- a/include/net/nexthop.h
+++ b/include/net/nexthop.h
@@ -29,6 +29,10 @@ struct nh_config {
int nh_ifindex;
struct net_device *dev;
+ union {
+ __be32 ipv4;
+ } gw;
+
u32 nlflags;
struct nl_info nlinfo;
};
@@ -42,6 +46,7 @@ struct nh_info {
union {
struct fib_nh_common fib_nhc;
+ struct fib_nh fib_nh;
};
};