summaryrefslogtreecommitdiffhomepage
path: root/src/ndp.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-07-01 21:26:34 +0200
committerHans Dedecker <dedeckeh@gmail.com>2014-07-01 21:46:32 +0200
commit1bbf34a1df3e16865b3b9330b338952076bc26f9 (patch)
treebb78767e3f84b2683cc20ad00e5a20eaf8eb735d /src/ndp.c
parent4267915aef64aae345972c77148b11759a172b14 (diff)
DHCPv6 destination address check
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.
Diffstat (limited to 'src/ndp.c')
-rw-r--r--src/ndp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ndp.c b/src/ndp.c
index 17ec8b4..50529b5 100644
--- a/src/ndp.c
+++ b/src/ndp.c
@@ -32,9 +32,9 @@
static void handle_solicit(void *addr, void *data, size_t len,
- struct interface *iface);
+ struct interface *iface, void *dest);
static void handle_rtnetlink(void *addr, void *data, size_t len,
- struct interface *iface);
+ struct interface *iface, void *dest);
static struct ndp_neighbor* find_neighbor(struct in6_addr *addr, bool strict);
static void modify_neighbor(struct in6_addr *addr, struct interface *iface,
bool add);
@@ -223,7 +223,7 @@ static ssize_t ping6(struct in6_addr *addr,
// Handle solicitations
static void handle_solicit(void *addr, void *data, size_t len,
- struct interface *iface)
+ struct interface *iface, _unused void *dest)
{
struct ip6_hdr *ip6 = data;
struct nd_neighbor_solicit *req = (struct nd_neighbor_solicit*)&ip6[1];
@@ -435,7 +435,7 @@ static void modify_neighbor(struct in6_addr *addr,
// Handler for neighbor cache entries from the kernel. This is our source
// to learn and unlearn hosts on interfaces.
static void handle_rtnetlink(_unused void *addr, void *data, size_t len,
- _unused struct interface *iface)
+ _unused struct interface *iface, _unused void *dest)
{
for (struct nlmsghdr *nh = data; NLMSG_OK(nh, len);
nh = NLMSG_NEXT(nh, len)) {