aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--ndp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ndp.c b/ndp.c
index 3e15494..5de4e50 100644
--- a/ndp.c
+++ b/ndp.c
@@ -350,9 +350,14 @@ int ndp(const struct ctx *c, const struct icmp6hdr *ih,
return 1;
if (ih->icmp6_type == NS) {
+ struct ndp_ns ns_storage;
const struct ndp_ns *ns;
+ struct iov_tail data;
- ns = packet_get(p, 0, 0, sizeof(struct ndp_ns), NULL);
+ if (!packet_data(p, 0, &data))
+ return -1;
+
+ ns = IOV_REMOVE_HEADER(&data, ns_storage);
if (!ns)
return -1;