diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-07-30 21:19:47 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-07-30 21:34:06 +0200 |
commit | 75ee79052e2307a7eac2d1e12712b0a8f051b4c4 (patch) | |
tree | 9ee79d284b085f8432ff5e8663eeb59e250ff33f /interface-ip.c | |
parent | ca970979e9a2b62646b610bfc32f655993527d03 (diff) |
interface-ip: fix eui64 ifaceid generation (FS#1668)
Use the mac address stored in the device_settings struct to generate the
eui64 ifaceid as the interface layer3 device does not contain a mac address
for non bridge interfaces
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/interface-ip.c b/interface-ip.c index 1e49fe6..c855cdb 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -723,8 +723,8 @@ eui64_ifaceid(struct interface *iface, struct in6_addr *addr) /* get mac address */ uint8_t *macaddr = iface->l3_dev.dev->settings.macaddr; uint8_t *ifaceid = addr->s6_addr + 8; - memcpy(ifaceid,macaddr,3); - memcpy(ifaceid + 5,macaddr + 3, 3); + memcpy(ifaceid, st.macaddr, 3); + memcpy(ifaceid + 5, st.macaddr + 3, 3); ifaceid[3] = 0xff; ifaceid[4] = 0xfe; ifaceid[0] ^= 0x02; |