Like ospfd, ospf6d can use ROUTE_FLAGFILTER to opt out of receiving messages
relating to L2 and broadcast routes on its routing socket.  We've been running
this for a week or so with no problems.

ok?

Index: kroute.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospf6d/kroute.c,v
retrieving revision 1.64
diff -u -p -u -p -r1.64 kroute.c
--- kroute.c    17 May 2020 18:29:25 -0000      1.64
+++ kroute.c    18 Aug 2020 11:56:09 -0000
@@ -102,6 +102,7 @@ kr_init(int fs, u_int rdomain, int redis
        int             opt = 0, rcvbuf, default_rcvbuf;
        socklen_t       optlen;
        int             filter_prio = fib_prio;
+       int             filter_flags = RTF_LLINFO | RTF_BROADCAST;
 
        kr_state.fib_sync = fs;
        kr_state.rdomain = rdomain;
@@ -127,6 +128,12 @@ kr_init(int fs, u_int rdomain, int redis
        if (setsockopt(kr_state.fd, AF_ROUTE, ROUTE_PRIOFILTER, &filter_prio,
            sizeof(filter_prio)) == -1) {
                log_warn("%s: setsockopt AF_ROUTE ROUTE_PRIOFILTER", __func__);
+               /* not fatal */
+       }
+
+       if (setsockopt(kr_state.fd, AF_ROUTE, ROUTE_FLAGFILTER, &filter_flags,
+           sizeof(filter_flags)) == -1) {
+               log_warn("%s: setsockopt AF_ROUTE ROUTE_FLAGFILTER", __func__);
                /* not fatal */
        }
 

Reply via email to