aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Blank <waldi@debian.org>2022-08-07 12:44:19 +0200
committerBastian Blank <waldi@debian.org>2022-08-07 12:51:22 +0200
commit1feabfef63d697a970c6524a39ef86c159b08e65 (patch)
treec4f204f7cf4ac65758b0cd2d4baad3654d7a858e
parent7132fef2a6b08d270b412d37a4c38b34728993ea (diff)
downloadslirp-1feabfef63d697a970c6524a39ef86c159b08e65.zip
slirp-1feabfef63d697a970c6524a39ef86c159b08e65.tar.gz
slirp-1feabfef63d697a970c6524a39ef86c159b08e65.tar.bz2
Use target address from Neighbor Advertisement
The IPv6 support in libslirp fails to work with any NDP proxy. The code used to interpret the NA packets uses the wrong address to insert into it's neighbor table, the address of the source of the packet, aka the proxy itself. However the NA packet got the real target address readily available. Just use it directly instead. Signed-off-by: Bastian Blank <waldi@debian.org>
-rw-r--r--src/ip6_icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ip6_icmp.c b/src/ip6_icmp.c
index 3168457..732b202 100644
--- a/src/ip6_icmp.c
+++ b/src/ip6_icmp.c
@@ -367,7 +367,7 @@ static void ndp_input(struct mbuf *m, Slirp *slirp, struct ip6 *ip,
ntohs(ip->ip_pl) >= ICMP6_NDP_NA_MINLEN &&
!IN6_IS_ADDR_MULTICAST(&icmp->icmp6_nna.target) &&
(!IN6_IS_ADDR_MULTICAST(&ip->ip_dst) || icmp->icmp6_nna.S == 0)) {
- ndp_table_add(slirp, ip->ip_src, eth->h_source);
+ ndp_table_add(slirp, icmp->icmp6_nna.target, eth->h_source);
}
break;