OSDN Git Service

nexthop: Add support for IPv4 nexthops
authorDavid Ahern <dsahern@gmail.com>
Fri, 24 May 2019 21:43:05 +0000 (14:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 04:37:30 +0000 (21:37 -0700)
commit597cfe4fc3390a055f42546c254e48601b37009f
tree654185d19b811823df503a1d33d1127e667184d6
parentab84be7e54fc3d9b248285f1a14067558d858819
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>
include/net/nexthop.h
net/ipv4/nexthop.c