From 1bbf34a1df3e16865b3b9330b338952076bc26f9 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 1 Jul 2014 21:26:34 +0200 Subject: DHCPv6 destination address check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As described in RFC3315 §15 any solicit, confirm, rebind or information request message is discarded if the destination address is unicast Likewise any request (§18.2.1), renew (§18.2.3), release (§18.2.6) or decline (§18.2.7) message is discarded and the server replies with the status code use multicast. --- src/dhcpv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dhcpv4.c') diff --git a/src/dhcpv4.c b/src/dhcpv4.c index b8d64ce..9746aa2 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -34,7 +34,7 @@ static void handle_dhcpv4(void *addr, void *data, size_t len, - struct interface *iface); + struct interface *iface, void *dest_addr); static struct dhcpv4_assignment* dhcpv4_lease(struct interface *iface, enum dhcpv4_msg msg, const uint8_t *mac, struct in_addr reqaddr, const char *hostname); @@ -225,7 +225,7 @@ static void dhcpv4_put(struct dhcpv4_message *msg, uint8_t **cookie, // Simple DHCPv6-server for information requests static void handle_dhcpv4(void *addr, void *data, size_t len, - struct interface *iface) + struct interface *iface, _unused void *dest_addr) { if (!iface->dhcpv4) return; -- cgit v1.2.3