Anyone running snmpd that can test this diff?

It should help better report connected routes in -current.
Similar diffs were commited to various routing daemons already.

-- 
:wq Claudio

Index: kroute.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/kroute.c,v
retrieving revision 1.30
diff -u -p -r1.30 kroute.c
--- kroute.c    16 Jan 2015 00:05:13 -0000      1.30
+++ kroute.c    16 Jul 2015 22:10:18 -0000
@@ -1458,7 +1458,19 @@ dispatch_rtmsg_addr(struct ktable *kt, s
 
        if ((sa = rti_info[RTAX_GATEWAY]) != NULL)
                switch (sa->sa_family) {
+               case AF_INET:
+               case AF_INET6:
+                       if (rtm->rtm_flags & RTF_CONNECTED) {
+                               flags |= F_CONNECTED;
+                               ifindex = rtm->rtm_index;
+                       }
+                       mpath = 0;      /* link local stuff can't be mpath */
+                       break;
                case AF_LINK:
+                       /*
+                        * Traditional BSD connected routes have
+                        * a gateway of type AF_LINK.
+                        */
                        flags |= F_CONNECTED;
                        ifindex = rtm->rtm_index;
                        mpath = 0;      /* link local stuff can't be mpath */

Reply via email to