From 6d06ac1faa1b06a9fb5793c970bccd5b47825d07 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 23 Nov 2015 15:49:10 +0100 Subject: sd-ndisc: always send the link-layer address We never send packets without first knowing the link-local L3 address, so we should always include the L2 address in RS packets. --- src/libsystemd-network/sd-ndisc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libsystemd-network/sd-ndisc.c') diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index 5591bc7841..249586f048 100644 --- a/src/libsystemd-network/sd-ndisc.c +++ b/src/libsystemd-network/sd-ndisc.c @@ -572,8 +572,6 @@ static int ndisc_router_advertisment_recv(sd_event_source *s, int fd, uint32_t r static int ndisc_router_solicitation_timeout(sd_event_source *s, uint64_t usec, void *userdata) { sd_ndisc *nd = userdata; uint64_t time_now, next_timeout; - struct ether_addr unset = { }; - struct ether_addr *addr = NULL; int r; assert(s); @@ -587,10 +585,7 @@ static int ndisc_router_solicitation_timeout(sd_event_source *s, uint64_t usec, nd->callback(nd, SD_NDISC_EVENT_TIMEOUT, nd->userdata); nd->state = NDISC_STATE_ADVERTISMENT_LISTEN; } else { - if (memcmp(&nd->mac_addr, &unset, sizeof(struct ether_addr))) - addr = &nd->mac_addr; - - r = icmp6_send_router_solicitation(nd->fd, addr); + r = icmp6_send_router_solicitation(nd->fd, &nd->mac_addr); if (r < 0) log_ndisc(nd, "Error sending Router Solicitation"); else { -- cgit v1.2.3-54-g00ecf