summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rwxr-xr-xconfigure.ac10
-rw-r--r--debian/lintian1
-rwxr-xr-xdebian/rules1
-rw-r--r--debian/vyatta-quagga.init.d4
-rw-r--r--zebra/interface.c16
-rw-r--r--zebra/zebra_rib.c47
8 files changed, 60 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index a11e756e..0b1ce70a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,7 +51,6 @@ pkgsrc/*.sh
vtysh/extract.pl
vtysh/vtysh
vtysh/vtysh_cmd.c
-watchlink/watchlink
watchquagga/watchquagga
zebra/testzebra
zebra/zebra
diff --git a/Makefile.am b/Makefile.am
index d0cf3771..a9a48ae1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = lib @ZEBRA@ @BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ \
redhat @SOLARIS@
DIST_SUBDIRS = lib zebra bgpd ripd ripngd ospfd ospf6d \
- isisd watchquagga watchlink vtysh ospfclient doc m4 pkgsrc redhat tests \
+ isisd watchquagga vtysh ospfclient doc m4 pkgsrc redhat tests \
solaris
EXTRA_DIST = aclocal.m4 SERVICES TODO REPORTING-BUGS INSTALL.quagga.txt \
diff --git a/configure.ac b/configure.ac
index 81f85a66..9f18bd39 100755
--- a/configure.ac
+++ b/configure.ac
@@ -200,8 +200,6 @@ AC_ARG_ENABLE(ospf6d,
[ --disable-ospf6d do not build ospf6d])
AC_ARG_ENABLE(watchquagga,
[ --disable-watchquagga do not build watchquagga])
-AC_ARG_ENABLE(watchlink,
-[ --disable-watchlink do not build watchlink])
AC_ARG_ENABLE(isisd,
[ --enable-isisd build isisd])
AC_ARG_ENABLE(solaris,
@@ -1161,12 +1159,6 @@ else
WATCHQUAGGA="watchquagga"
fi
-if test "${enable_watchlink}" = "no";then
- WATCHLINK=""
-else
- WATCHLINK="watchlink"
-fi
-
OSPFCLIENT=""
if test "${enable_opaque_lsa}" = "yes"; then
if test "${enable_ospfapi}" != "no";then
@@ -1431,7 +1423,6 @@ AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID)
AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID)
AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID)
AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$quagga_statedir/watchquagga.pid",watchquagga PID)
-AC_DEFINE_UNQUOTED(PATH_WATCHLINK_PID, "$quagga_statedir/watchlink.pid",watchlink PID)
AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket)
AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket)
AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket)
@@ -1465,7 +1456,6 @@ AC_CONFIG_FILES([Makefile lib/Makefile zebra/Makefile ripd/Makefile
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
ospf6d/Makefile isisd/Makefile vtysh/Makefile doc/Makefile
ospfclient/Makefile tests/Makefile m4/Makefile redhat/Makefile
- watchlink/Makefile
pkgsrc/Makefile
redhat/quagga.spec
lib/version.h
diff --git a/debian/lintian b/debian/lintian
index 8368204a..08d952e9 100644
--- a/debian/lintian
+++ b/debian/lintian
@@ -1,3 +1,2 @@
vyatta-quagga: binary-without-manpage usr/sbin/vyatta-ospfclient
vyatta-quagga: binary-without-manpage usr/sbin/vyatta-watchquagga
-vyatta-quagga: binary-without-manpage usr/sbin/vyatta-watchlink
diff --git a/debian/rules b/debian/rules
index 7681bcb3..ba47d987 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,7 +47,6 @@ configure += --enable-vtysh
configure += --enable-ipv6
configure += --enable-isisd
configure += --enable-watchquagga
-configure += --enable-watchlink
configure += --enable-opaque-lsa
configure += --enable-ospfclient=yes
configure += --enable-ospfapi=yes
diff --git a/debian/vyatta-quagga.init.d b/debian/vyatta-quagga.init.d
index 26051d22..4e342f8b 100644
--- a/debian/vyatta-quagga.init.d
+++ b/debian/vyatta-quagga.init.d
@@ -32,7 +32,6 @@ for dir in $pid_dir $log_dir ; do
done
declare -a common_args=( -d -P 0 )
-declare -a watchlink_args=( -s -d -i $pid_dir/watchlink.pid )
declare -a zebra_args=( ${common_args[@]} -l -s 1048576 -i $pid_dir/zebra.pid )
declare -a ripd_args=( ${common_args[@]} -i $pid_dir/ripd.pid )
declare -a ripngd_args=( ${common_args[@]} -i $pid_dir/ripngd.pid )
@@ -47,7 +46,6 @@ vyatta_quagga_start ()
if [ $# -gt 0 ] ; then
daemons=( $* )
else
-# daemons+=( watchlink )
daemons+=( zebra )
daemons+=( ripd )
# daemons+=( ripngd )
@@ -81,7 +79,7 @@ vyatta_quagga_stop ()
if [ $# -gt 0 ] ; then
daemons=( $* )
else
- daemons=( watchlink bgpd isisd ospf6d ospfd ripngd ripd zebra )
+ daemons=( bgpd isisd ospf6d ospfd ripngd ripd zebra )
fi
log_action_begin_msg "Stopping Quagga"
for daemon in ${daemons[@]} ; do
diff --git a/zebra/interface.c b/zebra/interface.c
index 7dc1b68d..cfcd5120 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -538,15 +538,25 @@ if_down (struct interface *ifp)
if (p->family == AF_INET)
connected_down_ipv4 (ifp, ifc);
+ }
+ }
+
+ /* Examine all static routes which direct to the interface. */
+ rib_update ();
+
#ifdef HAVE_IPV6
- else if (p->family == AF_INET6)
+ if (ifp->connected)
+ {
+ for (ALL_LIST_ELEMENTS (ifp->connected, node, next, ifc))
+ {
+ p = ifc->address;
+ if (p->family == AF_INET6)
connected_down_ipv6 (ifp, ifc);
-#endif /* HAVE_IPV6 */
}
}
- /* Examine all static routes which direct to the interface. */
rib_update ();
+#endif /* HAVE_IPV6 */
}
void
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index a4fa261b..24975f71 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -342,6 +342,7 @@ static int
nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
struct route_node *top)
{
+ struct interface *ifp;
struct prefix_ipv4 p;
struct route_table *table;
struct route_node *rn;
@@ -398,7 +399,16 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
newhop = match->nexthop;
if (newhop && nexthop->type == NEXTHOP_TYPE_IPV4)
nexthop->ifindex = newhop->ifindex;
-
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFINDEX)
+ {
+ ifp = if_lookup_by_index (newhop->ifindex);
+ return (ifp && if_is_operative (ifp));
+ }
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFNAME)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
return 1;
}
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
@@ -419,6 +429,17 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
|| newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
nexthop->rifindex = newhop->ifindex;
}
+
+ if (newhop->type == NEXTHOP_TYPE_IFINDEX)
+ {
+ ifp = if_lookup_by_index (newhop->ifindex);
+ return (ifp && if_is_operative (ifp));
+ }
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFNAME)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
return 1;
}
return 0;
@@ -439,6 +460,7 @@ static int
nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
struct route_node *top)
{
+ struct interface *ifp;
struct prefix_ipv6 p;
struct route_table *table;
struct route_node *rn;
@@ -496,7 +518,17 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
if (newhop && nexthop->type == NEXTHOP_TYPE_IPV6)
nexthop->ifindex = newhop->ifindex;
-
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFINDEX)
+ {
+ ifp = if_lookup_by_index (newhop->ifindex);
+ return (ifp && if_is_operative (ifp));
+ }
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFNAME)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
+
return 1;
}
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
@@ -519,6 +551,17 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
|| newhop->type == NEXTHOP_TYPE_IPV6_IFNAME)
nexthop->rifindex = newhop->ifindex;
}
+
+ if (newhop && newhop->type == NEXTHOP_TYPE_IFINDEX)
+ {
+ ifp = if_lookup_by_index (newhop->ifindex);
+ return (ifp && if_is_operative (ifp));
+ }
+ else if (newhop && newhop->type == NEXTHOP_TYPE_IFNAME)
+ {
+ ifp = if_lookup_by_name(newhop->ifname);
+ return (ifp && if_is_operative (ifp));
+ }
return 1;
}
return 0;