diff options
-rw-r--r-- | ndp.c | 6 | ||||
-rw-r--r-- | ndp.h | 3 | ||||
-rw-r--r-- | tap.c | 2 |
3 files changed, 4 insertions, 7 deletions
@@ -41,13 +41,11 @@ * ndp() - Check for NDP solicitations, reply as needed * @c: Execution context * @ih: ICMPv6 header - * @eh_source: Source Ethernet address * @saddr Source IPv6 address * * Return: 0 if not handled here, 1 if handled, -1 on failure */ -int ndp(struct ctx *c, const struct icmp6hdr *ih, - const unsigned char *eh_source, const struct in6_addr *saddr) +int ndp(struct ctx *c, const struct icmp6hdr *ih, const struct in6_addr *saddr) { char buf[BUFSIZ] = { 0 }; struct ipv6hdr *ip6hr; @@ -196,7 +194,7 @@ dns_done: ip6hr->hop_limit = 255; len += sizeof(*ehr) + sizeof(*ip6hr) + sizeof(*ihr); - memcpy(ehr->h_dest, eh_source, ETH_ALEN); + memcpy(ehr->h_dest, c->mac_guest, ETH_ALEN); memcpy(ehr->h_source, c->mac, ETH_ALEN); ehr->h_proto = htons(ETH_P_IPV6); @@ -6,7 +6,6 @@ #ifndef NDP_H #define NDP_H -int ndp(struct ctx *c, const struct icmp6hdr *ih, - const unsigned char *eh_source, const struct in6_addr *saddr); +int ndp(struct ctx *c, const struct icmp6hdr *ih, const struct in6_addr *saddr); #endif /* NDP_H */ @@ -576,7 +576,7 @@ resume: if (l4_len < sizeof(struct icmp6hdr)) continue; - if (ndp(c, (struct icmp6hdr *)l4h, eh->h_source, saddr)) + if (ndp(c, (struct icmp6hdr *)l4h, saddr)) continue; tap_packet_debug(NULL, ip6h, NULL, proto, NULL, 1); |