Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ struct ipv6_stub {
			    struct fib6_config *cfg, gfp_t gfp_flags,
			    struct netlink_ext_ack *extack);
	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 (*ndisc_send_na)(struct net_device *dev, const struct in6_addr *daddr,
			      const struct in6_addr *solicited_addr,
+6 −0
Original line number Diff line number Diff line
@@ -183,6 +183,11 @@ static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
	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) {
	.ipv6_dst_lookup   = eafnosupport_ipv6_dst_lookup,
	.ipv6_route_input  = eafnosupport_ipv6_route_input,
@@ -192,6 +197,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
	.fib6_select_path  = eafnosupport_fib6_select_path,
	.ip6_mtu_from_fib6 = eafnosupport_ip6_mtu_from_fib6,
	.fib6_nh_init	   = eafnosupport_fib6_nh_init,
	.ip6_del_rt	   = eafnosupport_ip6_del_rt,
};
EXPORT_SYMBOL_GPL(ipv6_stub);

+1 −0
Original line number Diff line number Diff line
@@ -926,6 +926,7 @@ static const struct ipv6_stub ipv6_stub_impl = {
	.ip6_mtu_from_fib6 = ip6_mtu_from_fib6,
	.fib6_nh_init	   = fib6_nh_init,
	.fib6_nh_release   = fib6_nh_release,
	.ip6_del_rt	   = ip6_del_rt,
	.udpv6_encap_enable = udpv6_encap_enable,
	.ndisc_send_na = ndisc_send_na,
	.nd_tbl	= &nd_tbl,