I proposed this changed in 2015 and sadly it exposed two bugs at that
time.

The first one has been found and fixed during g2k16: a default route
was referencing a stale ifa and considered invalid by rtisvalid().

The second one has been found by Matthias Pitzl and fixed this week
by bluhm@: em(4) was reporting incorrect link state.  This link state
being applied to the corresponding routes, rtisvalid() would refuse
to use the selected route which would break some NFS setups.

Please test and report back.

Index: netinet/ip_output.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_output.c,v
retrieving revision 1.340
diff -u -p -r1.340 ip_output.c
--- netinet/ip_output.c 29 May 2017 14:36:22 -0000      1.340
+++ netinet/ip_output.c 28 Jul 2017 09:06:42 -0000
@@ -203,7 +203,7 @@ reroute:
                        ro->ro_rt = rtalloc_mpath(&ro->ro_dst,
                            &ip->ip_src.s_addr, ro->ro_tableid);
 
-               if (ro->ro_rt == NULL) {
+               if (!rtisvalid(ro->ro_rt)) {
                        ipstat_inc(ips_noroute);
                        error = EHOSTUNREACH;
                        goto bad;

Reply via email to