mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
ipv6: add ipv6_dev_find to stubs
Add ipv6_dev_find to ipv6_stub to allow lookup of net_devices by IPV6 address in net/ipv4/icmp.c. Signed-off-by: Andreas Roeseler <andreas.a.roeseler@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
08baf54f01
commit
504a40113c
3 changed files with 10 additions and 0 deletions
|
@ -66,6 +66,8 @@ struct ipv6_stub {
|
||||||
|
|
||||||
int (*ipv6_fragment)(struct net *net, struct sock *sk, struct sk_buff *skb,
|
int (*ipv6_fragment)(struct net *net, struct sock *sk, struct sk_buff *skb,
|
||||||
int (*output)(struct net *, struct sock *, struct sk_buff *));
|
int (*output)(struct net *, struct sock *, struct sk_buff *));
|
||||||
|
struct net_device *(*ipv6_dev_find)(struct net *net, const struct in6_addr *addr,
|
||||||
|
struct net_device *dev);
|
||||||
};
|
};
|
||||||
extern const struct ipv6_stub *ipv6_stub __read_mostly;
|
extern const struct ipv6_stub *ipv6_stub __read_mostly;
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,12 @@ static int eafnosupport_ipv6_fragment(struct net *net, struct sock *sk, struct s
|
||||||
return -EAFNOSUPPORT;
|
return -EAFNOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct net_device *eafnosupport_ipv6_dev_find(struct net *net, const struct in6_addr *addr,
|
||||||
|
struct net_device *dev)
|
||||||
|
{
|
||||||
|
return ERR_PTR(-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_flow = eafnosupport_ipv6_dst_lookup_flow,
|
.ipv6_dst_lookup_flow = eafnosupport_ipv6_dst_lookup_flow,
|
||||||
.ipv6_route_input = eafnosupport_ipv6_route_input,
|
.ipv6_route_input = eafnosupport_ipv6_route_input,
|
||||||
|
@ -209,6 +215,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
|
||||||
.fib6_nh_init = eafnosupport_fib6_nh_init,
|
.fib6_nh_init = eafnosupport_fib6_nh_init,
|
||||||
.ip6_del_rt = eafnosupport_ip6_del_rt,
|
.ip6_del_rt = eafnosupport_ip6_del_rt,
|
||||||
.ipv6_fragment = eafnosupport_ipv6_fragment,
|
.ipv6_fragment = eafnosupport_ipv6_fragment,
|
||||||
|
.ipv6_dev_find = eafnosupport_ipv6_dev_find,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(ipv6_stub);
|
EXPORT_SYMBOL_GPL(ipv6_stub);
|
||||||
|
|
||||||
|
|
|
@ -1032,6 +1032,7 @@ static const struct ipv6_stub ipv6_stub_impl = {
|
||||||
#endif
|
#endif
|
||||||
.nd_tbl = &nd_tbl,
|
.nd_tbl = &nd_tbl,
|
||||||
.ipv6_fragment = ip6_fragment,
|
.ipv6_fragment = ip6_fragment,
|
||||||
|
.ipv6_dev_find = ipv6_dev_find,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ipv6_bpf_stub ipv6_bpf_stub_impl = {
|
static const struct ipv6_bpf_stub ipv6_bpf_stub_impl = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue