[Olsr-dev] why adding mac address in hello-msg

Henning Rogge (spam-protected)
Sat Oct 10 12:08:34 CEST 2015


Hi,

very nice to see someone noticed this "slightly ugly hack".

The DAT metric I use for NHDP/OLSRv2 uses linklayer information to get
the incoming datarate for each neighbor... unfortunately the nl80211
subsystem (of course) does only know the MAC address of the neighbors,
so I need a way to know which MAC address corresponds to which NHDP
neighbor (which I know via IP address).

The joke is that while every incoming (linklocal) multicast from the
neighbors contains the MAC address in the ethernet header, there is no
way in Linux to get the MAC address of an incoming UDP packet except
for using a raw socket... which are a headache to use with multicast
(e.g. creating the necessary IGMP/ICMPv6 multicast join/leave
messages).

I still hope there is a better way to do this, but until someone
suggest one I just added the MAC address to each NHDP HELLO message as
an easy way to get the MAC address of the other sides interface.

Henning

On Sat, Oct 10, 2015 at 5:26 AM, work_xl <(spam-protected)> wrote:
> Hi,
> In nhdp plugin code,there is a msg tlv named NHDP_MSGTLV_MAC.Writer write it
> and reader read it.But I could not find it in both rfc6130 and rfc7181.On
> the other hand,I did not realize its function in the codes .So,why do we add
> this tlv?What could happen if I just remove it?
> Best regards.
>
> xl
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev



More information about the Olsr-dev mailing list