NetBSD/sys/netinet6
kim c729dd4278 Fix default route selection
The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).
2020-04-13 14:04:27 +00:00
..
Makefile
dccp6_usrreq.c
dccp6_var.h
dest6.c
files.netinet6
frag6.c
icmp6.c
icmp6_private.h
in6.c
in6.h
in6_cksum.c
in6_gif.c
in6_gif.h
in6_ifattach.c
in6_ifattach.h
in6_l2tp.c
in6_l2tp.h
in6_offload.c
in6_offload.h
in6_pcb.c
in6_pcb.h
in6_print.c
in6_proto.c
in6_src.c
in6_var.h
ip6_flow.c
ip6_forward.c
ip6_id.c
ip6_input.c
ip6_mroute.c
ip6_mroute.h
ip6_output.c
ip6_private.h
ip6_var.h
ip6protosw.h
mld6.c
mld6_var.h
nd6.c nd6: RTM_MISS reports RTA_AUTHOR once more 2020-04-12 12:13:52 +00:00
nd6.h
nd6_nbr.c
nd6_rtr.c Fix default route selection 2020-04-13 14:04:27 +00:00
pim6.h
pim6_var.h
raw_ip6.c
raw_ip6.h
route6.c
scope6.c
scope6_var.h
sctp6_usrreq.c
sctp6_var.h
udp6.h
udp6_private.h
udp6_usrreq.c
udp6_var.h