Commit a7c978c6 authored by wenxu's avatar wenxu Committed by David S. Miller

openvswitch: using ip6_fragment in ipv6_stub

Using ipv6_stub->ipv6_fragment to avoid the netfilter dependency
Signed-off-by: default avatarwenxu <wenxu@ucloud.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d97898b
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <linux/in.h> #include <linux/in.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/openvswitch.h> #include <linux/openvswitch.h>
#include <linux/netfilter_ipv6.h>
#include <linux/sctp.h> #include <linux/sctp.h>
#include <linux/tcp.h> #include <linux/tcp.h>
#include <linux/udp.h> #include <linux/udp.h>
...@@ -848,13 +847,9 @@ static void ovs_fragment(struct net *net, struct vport *vport, ...@@ -848,13 +847,9 @@ static void ovs_fragment(struct net *net, struct vport *vport,
ip_do_fragment(net, skb->sk, skb, ovs_vport_output); ip_do_fragment(net, skb->sk, skb, ovs_vport_output);
refdst_drop(orig_dst); refdst_drop(orig_dst);
} else if (key->eth.type == htons(ETH_P_IPV6)) { } else if (key->eth.type == htons(ETH_P_IPV6)) {
const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops();
unsigned long orig_dst; unsigned long orig_dst;
struct rt6_info ovs_rt; struct rt6_info ovs_rt;
if (!v6ops)
goto err;
prepare_frag(vport, skb, orig_network_offset, prepare_frag(vport, skb, orig_network_offset,
ovs_key_mac_proto(key)); ovs_key_mac_proto(key));
memset(&ovs_rt, 0, sizeof(ovs_rt)); memset(&ovs_rt, 0, sizeof(ovs_rt));
...@@ -866,7 +861,7 @@ static void ovs_fragment(struct net *net, struct vport *vport, ...@@ -866,7 +861,7 @@ static void ovs_fragment(struct net *net, struct vport *vport,
skb_dst_set_noref(skb, &ovs_rt.dst); skb_dst_set_noref(skb, &ovs_rt.dst);
IP6CB(skb)->frag_max_size = mru; IP6CB(skb)->frag_max_size = mru;
v6ops->fragment(net, skb->sk, skb, ovs_vport_output); ipv6_stub->ipv6_fragment(net, skb->sk, skb, ovs_vport_output);
refdst_drop(orig_dst); refdst_drop(orig_dst);
} else { } else {
WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.", WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
......
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