aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipv6.h2
-rw-r--r--include/linux/netdevice.h15
2 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index ca1ad9ebbc92..a0649973ee5b 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -149,7 +149,7 @@ static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff *skb)
149{ 149{
150#if defined(CONFIG_NET_L3_MASTER_DEV) 150#if defined(CONFIG_NET_L3_MASTER_DEV)
151 if (!net->ipv4.sysctl_tcp_l3mdev_accept && 151 if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
152 ipv6_l3mdev_skb(IP6CB(skb)->flags)) 152 skb && ipv6_l3mdev_skb(IP6CB(skb)->flags))
153 return true; 153 return true;
154#endif 154#endif
155 return false; 155 return false;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 91ee3643ccc8..bf04a46f6d5b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3354,6 +3354,21 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3354bool is_skb_forwardable(const struct net_device *dev, 3354bool is_skb_forwardable(const struct net_device *dev,
3355 const struct sk_buff *skb); 3355 const struct sk_buff *skb);
3356 3356
3357static __always_inline int ____dev_forward_skb(struct net_device *dev,
3358 struct sk_buff *skb)
3359{
3360 if (skb_orphan_frags(skb, GFP_ATOMIC) ||
3361 unlikely(!is_skb_forwardable(dev, skb))) {
3362 atomic_long_inc(&dev->rx_dropped);
3363 kfree_skb(skb);
3364 return NET_RX_DROP;
3365 }
3366
3367 skb_scrub_packet(skb, true);
3368 skb->priority = 0;
3369 return 0;
3370}
3371
3357void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); 3372void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
3358 3373
3359extern int netdev_budget; 3374extern int netdev_budget;