Skip to content

Commit

Permalink
Make gluon-radv-filterd compatible with batadv 2016.2
Browse files Browse the repository at this point in the history
  • Loading branch information
belzebub40k committed Nov 23, 2016
1 parent 6aa93a8 commit 7866962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gluon-radv-filterd/src/gluon-radv-filterd.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static void update_tqs() {
snprintf(path, PATH_MAX, TRANSTABLE_GLOBAL, G.mesh_iface);
f = fopen(path, "r");
while (getline(&line, &len, f) != -1) {
if (sscanf(line, " * " F_MAC " (%*3u) via " F_MAC " (%*3u) (0x%*4x) [%*3c]",
if (sscanf(line, " * " F_MAC " %*d (%*3u) via " F_MAC " (%*3u) (0x%*4x) [%*3c]",
F_MAC_VAR(&mac_a), F_MAC_VAR(&mac_b)) != 12)
continue;

Expand Down

2 comments on commit 7866962

@jplitza
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this error was hard to figure out.

As I don't have any batman 2016.2 running, could you please paste the header line and an example data line? I'd like to know what that extra field is. ;-)

Also, this now is incompatible with earlier batman versions. We probably need to callc sscanf() twice with different format strings.

@belzebub40k
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree that radv-filterd should support COMPAT 14 and 15.

They added a VLAN ID to the output:

# batctl tg | head
Globally announced TT entries received via the mesh bat0
       Client         VID  (TTVN)       Originator      (Curr TTVN) (CRC       ) Flags
 * 4c:66:41:0b:cc:00   -1   (121) via ea:95:f7:d4:6b:00     (130)   (0xf329c410) [....]
 * f4:37:b7:23:45:00   -1   (250) via 02:27:cd:18:2e:00     (255)   (0xddbc8657) [.W..]
 * f4:f2:6d:30:5f:00   -1   ( 39) via f6:f5:6e:30:5f:00     ( 91)   (0x3fea2404) [....]
 * 08:3d:88:99:5b:00   -1   (183) via 1a:aa:f7:7a:26:00     (183)   (0x51de7c23) [.W..]
 * ec:08:6b:78:64:00   -1   (151) via ee:0c:6b:78:64:00     (184)   (0x23a3b9d6) [....]
 * 78:c3:e9:03:76:00   -1   (111) via aa:14:ab:fd:61:00     (113)   (0x7c2002ab) [.W..]
 * 58:48:22:75:e7:00   -1   (131) via ea:e2:27:fd:38:00     (148)   (0x2ca20b2c) [....]
 * 48:13:7e:8c:1a:00   -1   (154) via 62:e7:27:59:e9:00     (158)   (0xe67c8dbc) [.W..]

Please sign in to comment.