Commit 68a9b13d authored by David Ahern's avatar David Ahern Committed by David S. Miller

ipv6: Add delete route hook to stubs

Add ip6_del_rt to the IPv6 stub. The hook is needed by the nexthop
code to remove entries linked to a nexthop that is getting deleted.
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 26b1b8d7
...@@ -45,6 +45,7 @@ struct ipv6_stub { ...@@ -45,6 +45,7 @@ struct ipv6_stub {
struct fib6_config *cfg, gfp_t gfp_flags, struct fib6_config *cfg, gfp_t gfp_flags,
struct netlink_ext_ack *extack); struct netlink_ext_ack *extack);
void (*fib6_nh_release)(struct fib6_nh *fib6_nh); void (*fib6_nh_release)(struct fib6_nh *fib6_nh);
int (*ip6_del_rt)(struct net *net, struct fib6_info *rt);
void (*udpv6_encap_enable)(void); void (*udpv6_encap_enable)(void);
void (*ndisc_send_na)(struct net_device *dev, const struct in6_addr *daddr, void (*ndisc_send_na)(struct net_device *dev, const struct in6_addr *daddr,
const struct in6_addr *solicited_addr, const struct in6_addr *solicited_addr,
......
...@@ -183,6 +183,11 @@ static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, ...@@ -183,6 +183,11 @@ static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
return -EAFNOSUPPORT; return -EAFNOSUPPORT;
} }
static int eafnosupport_ip6_del_rt(struct net *net, struct fib6_info *rt)
{
return -EAFNOSUPPORT;
}
const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) { const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
.ipv6_dst_lookup = eafnosupport_ipv6_dst_lookup, .ipv6_dst_lookup = eafnosupport_ipv6_dst_lookup,
.ipv6_route_input = eafnosupport_ipv6_route_input, .ipv6_route_input = eafnosupport_ipv6_route_input,
...@@ -192,6 +197,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) { ...@@ -192,6 +197,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
.fib6_select_path = eafnosupport_fib6_select_path, .fib6_select_path = eafnosupport_fib6_select_path,
.ip6_mtu_from_fib6 = eafnosupport_ip6_mtu_from_fib6, .ip6_mtu_from_fib6 = eafnosupport_ip6_mtu_from_fib6,
.fib6_nh_init = eafnosupport_fib6_nh_init, .fib6_nh_init = eafnosupport_fib6_nh_init,
.ip6_del_rt = eafnosupport_ip6_del_rt,
}; };
EXPORT_SYMBOL_GPL(ipv6_stub); EXPORT_SYMBOL_GPL(ipv6_stub);
......
...@@ -926,6 +926,7 @@ static const struct ipv6_stub ipv6_stub_impl = { ...@@ -926,6 +926,7 @@ static const struct ipv6_stub ipv6_stub_impl = {
.ip6_mtu_from_fib6 = ip6_mtu_from_fib6, .ip6_mtu_from_fib6 = ip6_mtu_from_fib6,
.fib6_nh_init = fib6_nh_init, .fib6_nh_init = fib6_nh_init,
.fib6_nh_release = fib6_nh_release, .fib6_nh_release = fib6_nh_release,
.ip6_del_rt = ip6_del_rt,
.udpv6_encap_enable = udpv6_encap_enable, .udpv6_encap_enable = udpv6_encap_enable,
.ndisc_send_na = ndisc_send_na, .ndisc_send_na = ndisc_send_na,
.nd_tbl = &nd_tbl, .nd_tbl = &nd_tbl,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment