At Sun, 16 Nov 2025 11:09:24 -0000 (UTC), mlelstv%serpens.de@localhost (Michael van Elst) wrote:
Subject: Re: IPv6 problems.... (dhcpcd weirdness, rshd fails, etc.)
>
> woods%planix.ca@localhost ("Greg A. Woods") writes:
>
> > Nov 15 21:17:32 once inetd[10044]: connection from fe80::1030:c7e5:ac6d:b5ce%bge0(fe80::1030:c7e5:ac6d:b5ce%bge0), service shell (tcp6)
> > Nov 15 21:17:32 once rshd[10044]: can't get stderr port: Can't assign requested address
>
> Looks like a bug, the scope somehow gets lost and rshd cannot bind
> to an unscoped link local address (the scope references the interface).
What does "scope" mean in this context? Isn't the scope whether it is
link-local, site-local, or global, and isn't that inferred from the
prefix? How can that get lost?
I'm guessing it is the bindresvport(3) call (in lib/libc/net/rcmd.c:
rresvport_af_addr()) that is failing, but I haven't tried adding better
logging to see for sure. EADDRNOTAVAIL is odd when it clearly is trying
to use an address assigned to a working interface. After all the
initial connection is opened via that address -- it's just trying to
open another socket and bind it to another port on that same address.
Grasping at straws, but maybe it should be using bindresvport_sa()
instead?
> Nobody notices this with global IPv6 addresses.
Interesting -- I'm not sure how I can try it with the global address --
i.e. how do I get the client to bind its source address to the global
address instead of the link-local address when it is connecting to a
local server?
> > In looking for the cause of the rsh failure I also noted that dhcpcd is
> > doing the following every 10 seconds:
>
> > Nov 15 21:17:37 once dhcpcd[465]: bge0: requesting DHCPv6 information
>
> It's trying to get usuable addresses via DHCPv6. This is triggered
> by your router announcing a "managed" network prefix.
dhcpcd already got a usable IPv6 global address
I'm guessing this ongoing log entry is about dhcpcd doing router
solicitation, but it already got IPv6 routes too....
It just keeps doing it over and over again every 10 seconds.
Hints on the internets suggest maybe the router is broadcasting router
advertisements every 10 seconds (and that triggers dhcpcd), which may be
related to the next bit...
> > For the record my router and firewall is a Netgear ORBI RBR50. It's not
> > so new any more and so maybe it's not doing something right. There's
> > not much to configure on it though. My ISP has been providing IPv6
> > globally routed addresses for some time now.
>
> The router can be switched between IP address assignment via DHCP or
> via AutoConfig. Maybe it doesn't announce a "managed" network with
> the AutoConfig setting, but I doubt that.
>
> Otherwise you can tell dhcpcd to not use DHCPv6 in the config file
> ("nodhcpv6").
>
> Or you start using DHCPv6 instead of autoconfig.
Hmmmm..... the router's manual says:
8. Select an IP Address Assignment radio button:
+ Use DHCP Server. This method passes more information to LAN
devices but some IPv6 systems might not support the DHCv6 client
function.
+ Auto Config. This is the default setting. This setting specifies
how the router assigns IPv6 addresses to the devices on your home
network (the LAN)
I have left it at the default "Auto Config" setting.
I don't really understand what "auto config" means in IPv6 parlance, but
I'm guessing dhcpcd handles this as if it was getting a DHCP lease?
I.e. I only get a global address on my NetBSD systems when I set
"ip6mode=autohost" and I start "dhcpcd -6" (I need the -6 as I use
statically assigned IPv4 addresses on the LAN for these servers).
It's weird that this is a binary either/or choice. Can't you have
DHCPv6 and auto-configuration on the same LAN -- isn't it just a matter
of splitting the available address range?
I can try the other router setting and I guess if some device doesn't
get an IPv6 address because it can't do DHCPv6, well then presumably
it'll still get an IPv4 address and run through the NAT if it needs to.
I think I can check most devices, and via the router's admin interface I
can see what IPv4 addresses are assigned and to what device and I mostly
know what should be there.
Maybe that'll change how the Apple TV gets an IPv6 address too.
Something for tomorrow or later.
--
Greg A. Woods <gwoods%acm.org@localhost>
Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgpDVYeJAa_E3.pgp
Description: OpenPGP Digital Signature