Skip to contentSkip to conversation

batctl: fix backbone address in tcpdump for bla request frames

PATCH Applied Simon Wunderlich 2 participants 2 messages Aug 6, 2014 – Aug 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batctl: fix backbone address in tcpdump for bla request frames

From: Simon Wunderlich <[email protected]>

hw_src just contains another copy of the destination. The backbone sending the request is setting its mac address into Ethernet source, so print that instead.

For reference, see the documentation:
http://www.open-mesh.org/projects/batman-adv/wiki/Bridge-loop-avoidance-Protocol

---
 tcpdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tcpdump.c +1 -1
index e84617e..ada8938 100644
@@ -148,7 +148,7 @@ static int dump_bla2_claim(struct ether_header *eth_hdr,
 		break;
 	case BATADV_CLAIM_TYPE_REQUEST:
 		printf("BLA REQUEST, src backbone %s, ",
-		       get_name_by_macaddr((struct ether_addr *)hw_src, read_opt));
+		       get_name_by_macaddr((struct ether_addr *)eth_hdr->ether_shost, read_opt));
 		printf("dst backbone %s\n",
 		       get_name_by_macaddr((struct ether_addr *)eth_hdr->ether_dhost, read_opt));
 		break;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 6 lines · On Wednesday 06 August 2014 16:34:03 Simon Wunderlich wrote:

From: Simon Wunderlich <[email protected]>

hw_src just contains another copy of the destination. The backbone sending the request is setting its mac address into Ethernet source, so print that instead.

Quoted 8 lines

For reference, see the documentation:
http://www.open-mesh.org/projects/batman-adv/wiki/Bridge-loop-avoidance-Prot
ocol

---
 tcpdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision b904124.

Thanks,
Marek