summaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf_core.c
diff options
context:
space:
mode:
authorwenxu <wenxu@ucloud.cn>2020-08-28 23:14:31 +0800
committerDavid S. Miller <davem@davemloft.net>2020-08-31 12:26:39 -0700
commit1d97898b36bab91e8ffb38a660cc40eaba613f88 (patch)
tree471d117e7c2acfe1bfd34521481501275248ceb8 /net/ipv6/addrconf_core.c
parent353ff8ccadbeb42937c7a181e3851333ef46a0ee (diff)
downloadlinux-1d97898b36bab91e8ffb38a660cc40eaba613f88.tar.bz2
ipv6: add ipv6_fragment hook in ipv6_stub
Add ipv6_fragment to ipv6_stub to avoid calling netfilter when access ip6_fragment. Signed-off-by: wenxu <wenxu@ucloud.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf_core.c')
-rw-r--r--net/ipv6/addrconf_core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/addrconf_core.c b/net/ipv6/addrconf_core.c
index 9ebf3fe0d2b1..c70c192bc91b 100644
--- a/net/ipv6/addrconf_core.c
+++ b/net/ipv6/addrconf_core.c
@@ -191,6 +191,13 @@ static int eafnosupport_ip6_del_rt(struct net *net, struct fib6_info *rt,
return -EAFNOSUPPORT;
}
+static int eafnosupport_ipv6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
+ int (*output)(struct net *, struct sock *, struct sk_buff *))
+{
+ kfree_skb(skb);
+ return -EAFNOSUPPORT;
+}
+
const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
.ipv6_dst_lookup_flow = eafnosupport_ipv6_dst_lookup_flow,
.ipv6_route_input = eafnosupport_ipv6_route_input,
@@ -201,6 +208,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
.ip6_mtu_from_fib6 = eafnosupport_ip6_mtu_from_fib6,
.fib6_nh_init = eafnosupport_fib6_nh_init,
.ip6_del_rt = eafnosupport_ip6_del_rt,
+ .ipv6_fragment = eafnosupport_ipv6_fragment,
};
EXPORT_SYMBOL_GPL(ipv6_stub);