We fixed the kernel and now it should be no longer needed to insert
special multicast routes to allow sending of the multicast messages.
So this removes this code from kroute.c

please test (especially ripd)
-- 
:wq Claudio

Index: usr.sbin/ldpd/kroute.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldpd/kroute.c,v
retrieving revision 1.24
diff -u -p -r1.24 kroute.c
--- usr.sbin/ldpd/kroute.c      20 Oct 2010 12:16:41 -0000      1.24
+++ usr.sbin/ldpd/kroute.c      23 Jun 2011 20:33:42 -0000
@@ -108,9 +108,7 @@ RB_HEAD(kif_tree, kif_node)         kit;
 RB_PROTOTYPE(kif_tree, kif_node, entry, kif_compare)
 RB_GENERATE(kif_tree, kif_node, entry, kif_compare)
 
-struct kroute  kr_all_routers;
 int            flag_implicit_null = 0;
-int            flag_all_routers = 0;
 
 int
 kif_init(void)
@@ -166,17 +164,6 @@ kr_init(int fs)
        if (protect_lo() == -1)
                return (-1);
 
-       kr_all_routers.prefix.s_addr = inet_addr(AllRouters);
-       kr_all_routers.prefixlen = mask2prefixlen(INADDR_BROADCAST);
-       kr_all_routers.nexthop.s_addr = htonl(INADDR_LOOPBACK);
-       kr_all_routers.remote_label = NO_LABEL;
-
-       kr_state.fib_sync = 1;  /* force addition of multicast route */
-       if (send_rtmsg(kr_state.fd, RTM_ADD, &kr_all_routers, AF_INET) != -1)
-               flag_all_routers = 1;
-
-       kr_state.fib_sync = fs; /* now set correct sync mode */
-
        event_set(&kr_state.ev, kr_state.fd, EV_READ | EV_PERSIST,
            kr_dispatch_msg, NULL);
        event_add(&kr_state.ev, NULL);
@@ -255,13 +242,6 @@ void
 kr_shutdown(void)
 {
        kr_fib_decouple();
-
-       if (flag_all_routers) {
-               kr_state.fib_sync = 1;  /* force removal of mulitcast route */
-               (void)send_rtmsg(kr_state.fd, RTM_DELETE, &kr_all_routers,
-                   AF_INET);
-               kr_state.fib_sync = 0;  /* back to decoupled state */
-       }
 
        kroute_clear();
        kif_clear();
Index: usr.sbin/ripd/kroute.c
===================================================================
RCS file: /cvs/src/usr.sbin/ripd/kroute.c,v
retrieving revision 1.22
diff -u -p -r1.22 kroute.c
--- usr.sbin/ripd/kroute.c      12 Jul 2010 14:35:13 -0000      1.22
+++ usr.sbin/ripd/kroute.c      23 Jun 2011 20:33:05 -0000
@@ -97,9 +97,6 @@ RB_HEAD(kif_tree, kif_node)           kit;
 RB_PROTOTYPE(kif_tree, kif_node, entry, kif_compare)
 RB_GENERATE(kif_tree, kif_node, entry, kif_compare)
 
-struct kroute kr_all_rip_routers;
-int    flag_all_rip_routers = 0;
-
 int
 kif_init(void)
 {
@@ -151,14 +148,6 @@ kr_init(int fs, u_int rdomain)
        if (protect_lo() == -1)
                return (-1);
 
-       kr_all_rip_routers.prefix.s_addr = inet_addr(ALL_RIP_ROUTERS);
-       kr_all_rip_routers.netmask.s_addr = htonl(INADDR_BROADCAST);
-       kr_all_rip_routers.nexthop.s_addr = htonl(INADDR_LOOPBACK);
-
-       kr_state.fib_sync = 1; /* force addition of multicast route */
-       if (send_rtmsg(kr_state.fd, RTM_ADD, &kr_all_rip_routers) != -1)
-               flag_all_rip_routers = 1;
-
        kr_state.fib_sync = fs; /* now set correct sync mode */
        kr_state.rdomain = rdomain;
 
@@ -243,11 +232,6 @@ void
 kr_shutdown(void)
 {
        kr_fib_decouple();
-
-       if (flag_all_rip_routers) {
-               kr_state.fib_sync = 1; /* force removal of mulitcast route */
-               (void)send_rtmsg(kr_state.fd, RTM_DELETE, &kr_all_rip_routers);
-       }
 
        kroute_clear();
        kif_clear();

Reply via email to