]> asedeno.scripts.mit.edu Git - linux.git/commit
net: Initial nexthop code
authorDavid Ahern <dsahern@gmail.com>
Fri, 24 May 2019 21:43:04 +0000 (14:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 04:37:30 +0000 (21:37 -0700)
commitab84be7e54fc3d9b248285f1a14067558d858819
tree4b8c97ce0f45d4f0a0a85b8c27dee1e363b7f4c9
parent65ee00a9409f751188a8cdc0988167858eb4a536
net: Initial nexthop code

Barebones start point for nexthops. Implementation for RTM commands,
notifications, management of rbtree for holding nexthops by id, and
kernel side data structures for nexthops and nexthop config.

Nexthops are maintained in an rbtree sorted by id. Similar to routes,
nexthops are configured per namespace using netns_nexthop struct added
to struct net.

Nexthop notifications are sent when a nexthop is added or deleted,
but NOT if the delete is due to a device event or network namespace
teardown (which also involves device events). Applications are
expected to use the device down event to flush nexthops and any
routes used by the nexthops.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/net_namespace.h
include/net/netns/nexthop.h [new file with mode: 0644]
include/net/nexthop.h [new file with mode: 0644]
net/ipv4/Makefile
net/ipv4/nexthop.c [new file with mode: 0644]