aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--net/core/dev.c6
-rw-r--r--net/sched/sch_generic.c5
3 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5050218c5b7f..47c49ba2dcf4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2827,6 +2827,7 @@ int dev_set_mac_address(struct net_device *, struct sockaddr *);
2827int dev_change_carrier(struct net_device *, bool new_carrier); 2827int dev_change_carrier(struct net_device *, bool new_carrier);
2828int dev_get_phys_port_id(struct net_device *dev, 2828int dev_get_phys_port_id(struct net_device *dev,
2829 struct netdev_phys_port_id *ppid); 2829 struct netdev_phys_port_id *ppid);
2830struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device *dev);
2830int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, 2831int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2831 struct netdev_queue *txq); 2832 struct netdev_queue *txq);
2832int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb); 2833int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
diff --git a/net/core/dev.c b/net/core/dev.c
index 704a5434f77d..75bc5b068a13 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2656,7 +2656,7 @@ struct sk_buff *validate_xmit_vlan(struct sk_buff *skb, netdev_features_t featur
2656 return skb; 2656 return skb;
2657} 2657}
2658 2658
2659static struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device *dev) 2659struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device *dev)
2660{ 2660{
2661 netdev_features_t features; 2661 netdev_features_t features;
2662 2662
@@ -2719,10 +2719,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2719{ 2719{
2720 int rc = NETDEV_TX_OK; 2720 int rc = NETDEV_TX_OK;
2721 2721
2722 skb = validate_xmit_skb(skb, dev);
2723 if (!skb)
2724 return rc;
2725
2726 if (likely(!skb->next)) 2722 if (likely(!skb->next))
2727 return xmit_one(skb, dev, txq, false); 2723 return xmit_one(skb, dev, txq, false);
2728 2724
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 05b3f5d104af..f178798a5836 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -70,8 +70,11 @@ static inline struct sk_buff *dequeue_skb(struct Qdisc *q)
70 } else 70 } else
71 skb = NULL; 71 skb = NULL;
72 } else { 72 } else {
73 if (!(q->flags & TCQ_F_ONETXQUEUE) || !netif_xmit_frozen_or_stopped(txq)) 73 if (!(q->flags & TCQ_F_ONETXQUEUE) || !netif_xmit_frozen_or_stopped(txq)) {
74 skb = q->dequeue(q); 74 skb = q->dequeue(q);
75 if (skb)
76 skb = validate_xmit_skb(skb, qdisc_dev(q));
77 }
75 } 78 }
76 79
77 return skb; 80 return skb;