aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d2b4b67a7b53..11d013590166 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1747,6 +1747,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1747 __le16 fc; 1747 __le16 fc;
1748 struct ieee80211_hdr hdr; 1748 struct ieee80211_hdr hdr;
1749 struct ieee80211s_hdr mesh_hdr __maybe_unused; 1749 struct ieee80211s_hdr mesh_hdr __maybe_unused;
1750 struct mesh_path *mppath = NULL;
1750 const u8 *encaps_data; 1751 const u8 *encaps_data;
1751 int encaps_len, skip_header_bytes; 1752 int encaps_len, skip_header_bytes;
1752 int nh_pos, h_pos; 1753 int nh_pos, h_pos;
@@ -1807,16 +1808,23 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1807 ret = NETDEV_TX_OK; 1808 ret = NETDEV_TX_OK;
1808 goto fail; 1809 goto fail;
1809 } 1810 }
1811 if (!is_multicast_ether_addr(skb->data))
1812 mppath = mpp_path_lookup(skb->data, sdata);
1810 1813
1814 /*
1815 * Do not use address extension, if it is a packet from
1816 * the same interface and the destination is not being
1817 * proxied by any other mest point.
1818 */
1811 if (compare_ether_addr(sdata->vif.addr, 1819 if (compare_ether_addr(sdata->vif.addr,
1812 skb->data + ETH_ALEN) == 0) { 1820 skb->data + ETH_ALEN) == 0 &&
1821 (!mppath || !compare_ether_addr(mppath->mpp, skb->data))) {
1813 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, 1822 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
1814 skb->data, skb->data + ETH_ALEN); 1823 skb->data, skb->data + ETH_ALEN);
1815 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, 1824 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
1816 sdata, NULL, NULL); 1825 sdata, NULL, NULL);
1817 } else { 1826 } else {
1818 /* packet from other interface */ 1827 /* packet from other interface */
1819 struct mesh_path *mppath;
1820 int is_mesh_mcast = 1; 1828 int is_mesh_mcast = 1;
1821 const u8 *mesh_da; 1829 const u8 *mesh_da;
1822 1830
@@ -1827,8 +1835,6 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1827 else { 1835 else {
1828 static const u8 bcast[ETH_ALEN] = 1836 static const u8 bcast[ETH_ALEN] =
1829 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 1837 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
1830
1831 mppath = mpp_path_lookup(skb->data, sdata);
1832 if (mppath) { 1838 if (mppath) {
1833 /* RA TA mDA mSA AE:DA SA */ 1839 /* RA TA mDA mSA AE:DA SA */
1834 mesh_da = mppath->mpp; 1840 mesh_da = mppath->mpp;