diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-06-26 19:19:24 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-06-26 19:19:24 +0000 |
commit | c0514d215f7dc95172bc750125d5d725982249e5 (patch) | |
tree | ca306806c0e333e5837a9bbd929775f93a140fdc /usr.sbin | |
parent | f113e30f6563dfc57bc40cf991a22d7c3eb4c136 (diff) |
Remove obsolete mcast routes in ldpd and ripd.
OK dlg@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpd/kroute.c | 22 | ||||
-rw-r--r-- | usr.sbin/ripd/kroute.c | 18 |
2 files changed, 2 insertions, 38 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c index 800d4b5bdae..35590e4d032 100644 --- a/usr.sbin/ldpd/kroute.c +++ b/usr.sbin/ldpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.24 2010/10/20 12:16:41 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.25 2011/06/26 19:19:23 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -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); @@ -256,13 +243,6 @@ 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(); } diff --git a/usr.sbin/ripd/kroute.c b/usr.sbin/ripd/kroute.c index af1f7680bbe..3f496037015 100644 --- a/usr.sbin/ripd/kroute.c +++ b/usr.sbin/ripd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.22 2010/07/12 14:35:13 bluhm Exp $ */ +/* $OpenBSD: kroute.c,v 1.23 2011/06/26 19:19:23 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -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; @@ -244,11 +233,6 @@ 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(); } |