ffnord / mesh-announce

Discussion at #mesh-announce:irc.hackint.org and (separately) at
https://matrix.to/#/!MjLIHcALOcENXZWQlH:irc.hackint.org/$1547640760901FmKaD:matrix.eclabs.de
13 stars 45 forks source link

[BUGFIX] use MAC address from batctl #54

Closed genofire closed 4 years ago

AiyionPrime commented 4 years ago

[root@sn09]:~ # batctl -m bat99 o results in a response starting like this:

[B.A.T.M.A.N. adv 2018.0-6-g77f7aee1, MainIF/MAC: vlan-gt-299/de:bb:bd:62:bc:c4 (bat99/88:e6:40:ba:90:99 BATMAN_IV)]
   Originator        last-seen (#/255) Nexthop           [outgoingIF]
   9a:8d:21:f0:6e:93    0.764s   (240) 26:67:db:85:d5:df [mesh_fastd_99]
   9a:8d:21:f0:6e:93    0.764s   (225) 36:55:fb:f8:19:75 [mesh_fastd_99]
   9a:8d:21:f0:6e:93    0.764s   (221) 4e:9f:86:ac:ab:c4 [vlan-gt-299]
   9a:8d:21:f0:6e:93    0.764s   (221) 2e:51:1e:8e:b1:64 [vlan-gt-299]
...

While after @genofire 's commit it looks like this: [root@sn09]:~ # batctl -m bat99 o -nH and results in sth. like this:

   9a:8d:21:f0:6e:93    0.420s   (240) 26:67:db:85:d5:df [mesh_fastd_99]
   9a:8d:21:f0:6e:93    0.420s   (225) 36:55:fb:f8:19:75 [mesh_fastd_99]
   9a:8d:21:f0:6e:93    0.420s   (222) 4e:9f:86:ac:ab:c4 [vlan-gt-299]
   9a:8d:21:f0:6e:93    0.420s   (222) 2e:51:1e:8e:b1:64 [vlan-gt-299]
 * 9a:8d:21:f0:6e:93    0.420s   (252) 9a:8d:21:f0:6e:93 [vlan-gt-299]
...

This PR would increase the stability of mesh-announce in case batctl changes, how many line precede the originator table.

Tested with our current setup :x

batctl debian-2016.5-1 [batman-adv: 2018.0-6-g77f7aee1]

mweinelt commented 4 years ago

LGTM.

TobleMiner commented 4 years ago

LGTM, merged. Thanks