public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH] batctl: fix backbone address in tcpdump for bla request frames
Date: Wed,  6 Aug 2014 16:34:03 +0200	[thread overview]
Message-ID: <1407335643-2124-1-git-send-email-sw@simonwunderlich.de> (raw)

From: Simon Wunderlich <simon@open-mesh.com>

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 <simon@open-mesh.com>
---
 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;
-- 
1.9.1


             reply	other threads:[~2014-08-06 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 14:34 Simon Wunderlich [this message]
2014-08-11  4:52 ` [B.A.T.M.A.N.] [PATCH] batctl: fix backbone address in tcpdump for bla request frames Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407335643-2124-1-git-send-email-sw@simonwunderlich.de \
    --to=sw@simonwunderlich.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox