sendmail vs ipv6 broken after upgrade to 9.1
Ulrich Spörlein
uqs at FreeBSD.org
Wed Jan 9 14:21:19 UTC 2013
On Wed, 2013-01-09 at 14:14:18 +0100, Michiel Boland wrote:
> On 01/08/2013 23:33, Hiroki Sato wrote:
> > Ulrich Spörlein <uqs at freebsd.org> wrote
> > in <20130108184051.GI35868 at acme.spoerlein.net>:
> >
> > uq> After setting this, it now looks like this:
> > uq> root at acme: ~# ip6addrctl
> > uq> Prefix Prec Label Use
> > uq> ::1/128 50 0 0
> > uq> ::/0 40 1 0
> > uq> 2002::/16 30 2 0
> > uq> ::/96 20 3 0
> > uq> ::ffff:0.0.0.0/96 10 4 0
> > uq>
> > uq> And even sendmail is happily finding the sockets to bind to. Thanks for the hint!
> >
> > I think this just hides the problem. If gshapiro@'s explanation is
> > correct, no ::ffff:0.0.0.0/96 address should be returned if the name
> > resolution works fine...
> >
> > -- Hiroki
> >
>
> getipnodebyname(xx, AF_INET6, AI_DEFAULT|AI_ALL) does this:-
>
> If a host has both IPv6 and IPv4 addresses, both are returned.
> The IPv4 address is presented as a mapped address.
> The order in which the addresses are returns depends on the
> address selection policy (_hpreorder in lib/libc/net/name6.c)
Is this also supposed to work for selecting the source IP address for
outgoing packets/sockets? And should it work for ping6?
Using a tunnel for IPv6, I have this transfer net configured on my
router, but for ACL purposes I would like to have all connections come
from my real prefix, not the transfer net. So I wrote my own policy, yet
ping6 seems to ignore it.
The tunnel:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
options=80000<LINKSTATE>
inet6 fe80::230:5ff:fe77:e7a0%tun0 prefixlen 64 scopeid 0xd
inet6 fe80::2428:ff00:1b:2%tun0 prefixlen 64 scopeid 0xd
inet6 2a02:2528:ff00:1b::2 --> 2a02:2528:ff00:1b::1 prefixlen 128
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
The policy:
root at coyote:~# ip6addrctl
Prefix Prec Label Use
::1/128 50 0 0
::/0 40 1 107
2002::/16 30 2 0
::/96 20 3 0
::ffff:0.0.0.0/96 10 4 0
2a02:2528:ff0d::/64 60 5 85
The ping:
root at coyote:~# ping6 acme
PING6(56=40+8+8 bytes) 2a02:2528:ff00:1b::2 --> 2a01:4f8:131:23c2::1
16 bytes from 2a01:4f8:131:23c2::1, icmp_seq=0 hlim=54 time=43.606 ms
16 bytes from 2a01:4f8:131:23c2::1, icmp_seq=1 hlim=54 time=42.871 ms
As you can see, source prefix stays 2a02:2528:ff00, though I'd like it
to be 2a02:2528:ff0d.
Cheers,
Uli
More information about the freebsd-stable
mailing list