summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-27 12:36:54 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-27 12:36:54 -0700
commit99a9a0c9e045732e5977b24192e971ade92b59aa (patch)
tree188e355934c3dfeefa1d72cf1c6fdeeb3dd395a1
parent98c5476432c7a5d9b6eb79ef60262f79efa4588f (diff)
downloadquagga-99a9a0c9e045732e5977b24192e971ade92b59aa.tar.bz2
quagga-99a9a0c9e045732e5977b24192e971ade92b59aa.tar.xz
Change how link-detect is configured in build
Rather that looking for /proc/sys/net/ipv4/conf, use --enable-linkdetect flag to configure.
-rwxr-xr-xconfigure.ac18
-rwxr-xr-xdebian/rules1
-rw-r--r--zebra/interface.h3
3 files changed, 14 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index e679632f..1d2b2a3a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,8 @@ AC_ARG_ENABLE(bgp-announce,
[ --disable-bgp-announce, turn off BGP route announcement])
AC_ARG_ENABLE(netlink,
[ --enable-netlink force to use Linux netlink interface])
+AC_ARG_ENABLE(linkdetect,
+[ --enable-linkdetect use Linux link-detect configuration])
AC_ARG_ENABLE(broken-aliases,
[ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
AC_ARG_ENABLE(snmp,
@@ -917,6 +919,16 @@ AC_CHECK_HEADER([net/if.h],
QUAGGA_INCLUDES)],
[], QUAGGA_INCLUDES )
+
+dnl ---------------------------------------------------------------
+dnl kernel link-detect enable via /proc/sys/net/ipv4/conf/ethX/link_detect
+dnl ---------------------------------------------------------------
+if test "${enable_linkdetect}" = "yes"; then
+ AC_DEFINE(HAVE_LINKDETECT,1,Enable Linux kernel linkdetect)
+ LINK_DETECT=if_linkdetect.o
+fi
+AC_SUBST(LINK_DETECT)
+
dnl -----------------------
dnl check proc file system.
dnl -----------------------
@@ -931,12 +943,6 @@ if test -r /proc/net/if_inet6; then
fi
AC_SUBST(IF_PROC)
-if test -r /proc/sys/net/ipv4/conf; then
- AC_DEFINE(HAVE_PROC_NET_IPV4_CONF,,/proc/sys/net/ipv4/conf)
- LINK_DETECT=if_linkdetect.o
-fi
-AC_SUBST(LINK_DETECT)
-
dnl -----------------------------
dnl check ipforward detect method
dnl -----------------------------
diff --git a/debian/rules b/debian/rules
index e89dc246..f5f7e932 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,6 +61,7 @@ configure += --enable-logfile-mask=0640
configure += --enable-rtadv
configure += --enable-tcp-md5
configure += --enable-gcc-rdynamic
+configure += --enable-linkdetect
configure += $(xable_snmp)
configure += --with-libpam
configure += CFLAGS="$(CFLAGS)"
diff --git a/zebra/interface.h b/zebra/interface.h
index 6f356686..6ab25bf4 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -234,11 +234,10 @@ extern int interface_list_proc (void);
extern int ifaddr_proc_ipv6 (void);
#endif /* HAVE_PROC_NET_IF_INET6 */
-#ifdef HAVE_PROC_NET_IPV4_CONF
+#ifdef HAVE_LINKDETECT
extern int if_linkdetect_on (const char *);
extern int if_linkdetect_off (const char *);
#else
-#error config
#define if_linkdetect_on(name)
#define if_linkdetect_off(name)
#endif