Date: Thu, 01 Apr 2010 22:01:23 +0200 From: Pieter de Boer <pieter@thedarkside.nl> To: freebsd-net@freebsd.org Subject: ::1 magically replaced with other address (2) Message-ID: <4BB4FB93.8020108@thedarkside.nl>
next in thread | raw e-mail | index | archive | help
Hi folks, A couple of days ago I sent a mail to this list detailing an issue I have. To summarize: every once in a while my ::1 address on lo0 is replaced with another ipv6-address that's configured on lo3 and used in a child jail of a jail. I've been digging a bit through the FreeBSD source code and found a possible spot where this may occur. In the function in6_selectsrc() in /sys/netinet6/in6_src.c the following code can be found: TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { ... prison_local_ip6(cred, &ia->ia_addr.sin6_addr, (inp != NULL && (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0) continue; ... } prison_local_ip6() appears to replace a loopback address with a jail's main address: if (IN6_IS_ADDR_LOOPBACK(ia6)) { bcopy(&pr->pr_ip6[0], ia6, sizeof(struct in6_addr)); ... The way I read this code is that it replaces the interface address 'ia' when it is a loopback address with the prison's main address. Can anyone with more clue about this code tell if I read this correctly and possibly even help with fixing the problem if that is the case? Thanks, Pieter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB4FB93.8020108>