Author: marek Date: 2010-07-25 02:16:06 +0200 (Sun, 25 Jul 2010) New Revision: 1748
Modified: trunk/batman-adv/soft-interface.c Log: batman-adv: send fragmented packets with mac of primary interface
Fragmentated packets should use the primary mac in the 'orig' field as the receiving end uses the global mac hash to store information. If the mac address can't be found the packet is dropped.
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
Modified: trunk/batman-adv/soft-interface.c =================================================================== --- trunk/batman-adv/soft-interface.c 2010-07-25 00:16:05 UTC (rev 1747) +++ trunk/batman-adv/soft-interface.c 2010-07-25 00:16:06 UTC (rev 1748) @@ -224,6 +224,9 @@ data_len + sizeof(struct unicast_packet) > batman_if->net_dev->mtu) {
+ if (!bat_priv->primary_if) + goto dropped; + hdr_len = sizeof(struct unicast_frag_packet);
frag_skb = dev_alloc_skb(data_len - (data_len / 2) + @@ -245,7 +248,8 @@ ucast_frag1->packet_type = BAT_UNICAST_FRAG; ucast_frag1->ttl = TTL; memcpy(ucast_frag1->orig, - batman_if->net_dev->dev_addr, ETH_ALEN); + bat_priv->primary_if->net_dev->dev_addr, + ETH_ALEN); memcpy(ucast_frag1->dest, orig_node->orig, ETH_ALEN);
memcpy(ucast_frag2, ucast_frag1,