diff options
-rw-r--r-- | include/linux/netdevice.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8e03b06e638e..1eaf5ae14fea 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1917,6 +1917,16 @@ static inline void netif_set_gso_max_size(struct net_device *dev, | |||
1917 | dev->gso_max_size = size; | 1917 | dev->gso_max_size = size; |
1918 | } | 1918 | } |
1919 | 1919 | ||
1920 | static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | ||
1921 | struct net_device *master) | ||
1922 | { | ||
1923 | if (skb->pkt_type == PACKET_HOST) { | ||
1924 | u16 *dest = (u16 *) eth_hdr(skb)->h_dest; | ||
1925 | |||
1926 | memcpy(dest, master->dev_addr, ETH_ALEN); | ||
1927 | } | ||
1928 | } | ||
1929 | |||
1920 | /* On bonding slaves other than the currently active slave, suppress | 1930 | /* On bonding slaves other than the currently active slave, suppress |
1921 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 1931 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and |
1922 | * ARP on active-backup slaves with arp_validate enabled. | 1932 | * ARP on active-backup slaves with arp_validate enabled. |
@@ -1930,6 +1940,14 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1930 | if (master->priv_flags & IFF_MASTER_ARPMON) | 1940 | if (master->priv_flags & IFF_MASTER_ARPMON) |
1931 | dev->last_rx = jiffies; | 1941 | dev->last_rx = jiffies; |
1932 | 1942 | ||
1943 | if ((master->priv_flags & IFF_MASTER_ALB) && master->br_port) { | ||
1944 | /* Do address unmangle. The local destination address | ||
1945 | * will be always the one master has. Provides the right | ||
1946 | * functionality in a bridge. | ||
1947 | */ | ||
1948 | skb_bond_set_mac_by_master(skb, master); | ||
1949 | } | ||
1950 | |||
1933 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | 1951 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { |
1934 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | 1952 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && |
1935 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) | 1953 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) |