From patchwork Wed Aug 6 14:34:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 4150 Return-Path: Received: from mail.mail.packetmixer.de (packetmixer.de [79.140.42.25]) by open-mesh.org (Postfix) with ESMTPS id EE2AA6007EE for ; Wed, 6 Aug 2014 16:34:12 +0200 (CEST) Received: from kero.packetmixer.de (unknown [IPv6:2a02:3100:260a:d800:221:ccff:fe73:b665]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id 6EF3062159; Wed, 6 Aug 2014 16:35:51 +0200 (CEST) From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 6 Aug 2014 16:34:03 +0200 Message-Id: <1407335643-2124-1-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 1.9.1 Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH] batctl: fix backbone address in tcpdump for bla request frames X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2014 14:34:13 -0000 From: Simon Wunderlich 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 Signed-off-by: Simon Wunderlich --- tcpdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdump.c b/tcpdump.c index e84617e..ada8938 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -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;