diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 8ffc52e01ece..7e00a7342ee6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -131,6 +131,7 @@ | |||
131 | #include <linux/static_key.h> | 131 | #include <linux/static_key.h> |
132 | #include <linux/hashtable.h> | 132 | #include <linux/hashtable.h> |
133 | #include <linux/vmalloc.h> | 133 | #include <linux/vmalloc.h> |
134 | #include <linux/if_macvlan.h> | ||
134 | 135 | ||
135 | #include "net-sysfs.h" | 136 | #include "net-sysfs.h" |
136 | 137 | ||
@@ -1424,6 +1425,10 @@ void dev_disable_lro(struct net_device *dev) | |||
1424 | if (is_vlan_dev(dev)) | 1425 | if (is_vlan_dev(dev)) |
1425 | dev = vlan_dev_real_dev(dev); | 1426 | dev = vlan_dev_real_dev(dev); |
1426 | 1427 | ||
1428 | /* the same for macvlan devices */ | ||
1429 | if (netif_is_macvlan(dev)) | ||
1430 | dev = macvlan_dev_real_dev(dev); | ||
1431 | |||
1427 | dev->wanted_features &= ~NETIF_F_LRO; | 1432 | dev->wanted_features &= ~NETIF_F_LRO; |
1428 | netdev_update_features(dev); | 1433 | netdev_update_features(dev); |
1429 | 1434 | ||
@@ -1690,13 +1695,9 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
1690 | kfree_skb(skb); | 1695 | kfree_skb(skb); |
1691 | return NET_RX_DROP; | 1696 | return NET_RX_DROP; |
1692 | } | 1697 | } |
1693 | skb->protocol = eth_type_trans(skb, dev); | ||
1694 | 1698 | ||
1695 | /* eth_type_trans() can set pkt_type. | ||
1696 | * call skb_scrub_packet() after it to clear pkt_type _after_ calling | ||
1697 | * eth_type_trans(). | ||
1698 | */ | ||
1699 | skb_scrub_packet(skb, true); | 1699 | skb_scrub_packet(skb, true); |
1700 | skb->protocol = eth_type_trans(skb, dev); | ||
1700 | 1701 | ||
1701 | return netif_rx(skb); | 1702 | return netif_rx(skb); |
1702 | } | 1703 | } |