summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-ndisc.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-23 15:49:10 +0100
committerTom Gundersen <teg@jklm.no>2015-11-25 18:30:31 +0100
commit6d06ac1faa1b06a9fb5793c970bccd5b47825d07 (patch)
tree555d2c1804d05ceaf39586ca142be9e0e78f2b04 /src/libsystemd-network/sd-ndisc.c
parent0d43d2fcb7ac5264c739dc2f67f93ed0985a418a (diff)
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.
Diffstat (limited to 'src/libsystemd-network/sd-ndisc.c')
-rw-r--r--src/libsystemd-network/sd-ndisc.c7
1 files changed, 1 insertions, 6 deletions
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 {