diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 312cbd0e5038..70d0de404197 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | 41 | ||
42 | #include <linux/bpf-cgroup.h> | ||
42 | #include <linux/netfilter.h> | 43 | #include <linux/netfilter.h> |
43 | #include <linux/netfilter_ipv6.h> | 44 | #include <linux/netfilter_ipv6.h> |
44 | 45 | ||
@@ -131,6 +132,14 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff * | |||
131 | 132 | ||
132 | static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb) | 133 | static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *skb) |
133 | { | 134 | { |
135 | int ret; | ||
136 | |||
137 | ret = BPF_CGROUP_RUN_PROG_INET_EGRESS(sk, skb); | ||
138 | if (ret) { | ||
139 | kfree_skb(skb); | ||
140 | return ret; | ||
141 | } | ||
142 | |||
134 | if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || | 143 | if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || |
135 | dst_allfrag(skb_dst(skb)) || | 144 | dst_allfrag(skb_dst(skb)) || |
136 | (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size)) | 145 | (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size)) |