Re: RC3 trouble?
Neal P. Murphy
Fri Dec 08 23:51:05 2017
[See bottom]
On Fri, 8 Dec 2017 18:29:06 -0500
"Neal P. Murphy" <neal.p.murphy@xxxxxxxxxxxx> wrote:
> On Fri, 8 Dec 2017 10:49:24 +0000
> Roy Marples <roy@xxxxxxxxxxxx> wrote:
>
> > On 07/12/2017 22:59, Neal P. Murphy wrote:
> > > With respect to linx config bits, this might be helpful:
> > > http://tldp.org/HOWTO/html_single/Linux+IPv6-HOWTO/#proc-sys-net-ipv6.
> > > In short, if multiple IFs are used and forwarding is turned on (i.e., the system is a router), the kernel ignores RAs and performs no autoconfig; Smoothwall is a router and has forwarding turned on (double-checked). I don't see anything in the kernel config (either 3.16 running or 3.4 headers) that would mess this up; but I could be blind today.
> >
> > autoconfig also affects the link-local address which it would still need
> > for any IPv6 communication. That is what dhcpcd is trying to disable so
> > it can use stable private addresses for link-local.
> >
> > So if you're correct and this message is because it's a router then imho
> > that's a kernel bug and dhcpcd is just reporting it.
> > I think I'll just leave this as it is for now, you only see the message
> > when debugging is enabled and it's still valid.
> >
> > >
> > > I pulled and built master. Good news: -4 now properly doesn't listen on IPv6.
> >
> > Yay!
> >
> > > dhcpcd doesn't report that it assigned ...:960::1/64 to eth3 or that it added the route, but it does report that it completed DAD for eth3. Nor does it report removing these things when exiting. Is it possible that dhcpcd somehow doesn't track this? Or doesn't track it in *my* case because I'm doing something odd?
> >
> > Correct.
> > dhcpcd won't remove addresses or routes it didn't add, unless they will
> > conflict with what it wants to add (which on Linux isn't that too much
> > thanks to route metrics).
> >
> > Now if dhcpcd loses track of something - like say you restarted it
> > without dropping prior and you get a different delegation, then this
> > won't be cleaned up as dhcpcd has stopped tracking it. I don't intend to
> > fix that case because it could potentially do something nasty as it
> > would be guesswork.
> >
> > >
> > > Curious. When I 'ip link set dev eth3 down', it detects lost carrier and *does* remove everything (all routes, all global addresses, and doesn't touch the LL routes). Nice and clean. But when I 'ip link set dev eth3 up'; it restores everything *except* the /64 delegated to eth3 and the route for it.
> >
> > That's the linux kernel un-helpfully doing that.
> >
> > So I think that's all the problems resolved now yes?
> > I did just solve a problem where the non debug case spammed syslog each
> > DHCP6 reply when there was a prefix delegation if you're interested in that.
>
> I should clarify. When I set eth3 down, IPv6 addressing and routing for the respective delegated prefixes on eth0, eth1, eth2 and eth3 are removed, as is the reject route for lo, as dhcpcd responds to the 'carrier lost' condition (though I could be misinterpreting the dhcpcd debug output). And when I set eth3 up again, the respective addressing and routing for delegated prefixes/addresses is restored, *except* for the delegated address on eth3, as dhcpcd responds to the 'carrier acquired' condition by going through the solicit/rebind process.
>
> I'm seeing an inconsistency between starting and stopping dhcpcd (as opposed to restarting it). I wouldn't expect dhcpcd to forget the addresses it assigned and the routes it set between the time it starts and when it stops. Maybe linux fails to remove the /128 route when that address is removed; that would be a kernel bug if the kernel auto-added the route. Dhcpcd adds a /64 address (from the /60 delegation) to eth3, but doesn't remove that address when it exits.
>
> Also, I don't see any difference between 'persistent' active in the .conf and it commented out.
>
> Some question that might further clarify what I see:
> - Who adds routes when dhcpcd adds IPv6 addresses: dhcpcd or linux?
> - Who deletes routes when dhcpcd removes addresses: dhcpcd or linux?
> - Should 'persistent' cause dhcpcd to leave all 'as-is' when it exits?
> - The /64 assigned to eth3 is not marked 'dynamic' (I just noticed this). Might this explain
> why dhcpcd doesn't remove it? The /64s on eth0 and eth2 and the /128 on eth3 are marked 'dynamic'
> and do get removed. The /64 routes for eth0 and eth2 are removed. But the /128 route for eth3 is
> left in place.
>
> If you want, email me an SSH public key suitable for use in .ssh/authorized_keys and I'll give you access to the firewall. You should be able to bounce IPv6 all day without affecting access via IPv4. If I'm *very* clever, I might be able to pass IPv6 through my perimeter F/W to a test system such that the perimeter gets IPv4 addressing from comcrash while the test unit gets IPv6 addressing. This might require some clever MAC address fakery and trickery.
There *is* a slight difference with persistent and not. When persistent, the reject route on lo remains after dhcpcd exits; without persistent, the reject route is removed on exit.
N
Archive administrator: postmaster@marples.name