From: Donald Sharp Date: Fri, 26 May 2017 18:56:19 +0000 (-0400) Subject: babeld: The sockaddr code is not passed through anymore X-Git-Tag: reindent-master-before~74^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7217de2d8add45e71b49a15df965cc1d26389d5f;p=matthieu%2Ffrr.git babeld: The sockaddr code is not passed through anymore The hw_addr_len and hw_addr are properly setup on all the different systems. We no longer need to have individual daemons know anything about this underlying mechanism to get the data from the kernel. Signed-off-by: Donald Sharp --- diff --git a/babeld/kernel.c b/babeld/kernel.c index da8fadac7c..9aaa892b44 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -250,13 +250,10 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui) if (ifp == NULL) { return -1; } -#ifdef HAVE_STRUCT_SOCKADDR_DL - u_char len = ifp->sdl.sdl_alen; - char *tmp = ifp->sdl.sdl_data + ifp->sdl.sdl_nlen; -#else + u_char len = (u_char) ifp->hw_addr_len; char *tmp = (void*) ifp->hw_addr; -#endif + if (len == 8) { memcpy(eui, tmp, 8); eui[0] ^= 2;