OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 24-Jul-2003 23:03:08
Branch: HEAD Handle: 2003072422030701
Modified files:
openpkg-src/zebra rc.zebra zebra.patch
Log:
fix PR#176 set default daemon bind/listen address to 127.0.0.1
Summary:
Revision Changes Path
1.13 +13 -1 openpkg-src/zebra/rc.zebra
1.4 +35 -0 openpkg-src/zebra/zebra.patch
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/rc.zebra
============================================================================
$ cvs diff -u -r1.12 -r1.13 rc.zebra
--- openpkg-src/zebra/rc.zebra 24 Jul 2003 07:03:19 -0000 1.12
+++ openpkg-src/zebra/rc.zebra 24 Jul 2003 21:03:07 -0000 1.13
@@ -6,6 +6,9 @@
%config
zebra_enable="$openpkg_rc_def"
zebra_protocols="rip ospf bgp"
+ zebra_flags=""
+ zebra_bind="127.0.0.1"
+ zebra_port="2601"
zebra_log_prolog="true"
zebra_log_epilog="true"
zebra_log_numfiles="10"
@@ -28,8 +31,17 @@
%start -u @l_susr@
rcService zebra enable yes || exit 0
rcService zebra active yes && exit 0
+ flags="$zebra_flags"
+ echo $flags | grep -- -A >/dev/null
+ if [ $? -ne 0 -a ".$zebra_bind" != . ]; then
+ flags="$flags -A $zebra_bind"
+ fi
+ echo $flags | grep -- -P >/dev/null
+ if [ $? -ne 0 -a ".$zebra_port" != . ]; then
+ flags="$flags -P $zebra_port"
+ fi
cd @l_prefix@/etc/zebra
- @l_prefix@/sbin/zebra -d
+ @l_prefix@/sbin/zebra -d $flags
for protocol in $zebra_protocols; do
if [ -f @l_prefix@/sbin/${protocol}d ]; then
@l_prefix@/sbin/${protocol}d -d
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/zebra/zebra.patch
============================================================================
$ cvs diff -u -r1.3 -r1.4 zebra.patch
--- openpkg-src/zebra/zebra.patch 27 Apr 2003 08:20:02 -0000 1.3
+++ openpkg-src/zebra/zebra.patch 24 Jul 2003 21:03:08 -0000 1.4
@@ -194,3 +194,38 @@
return 0;
/* Generate a digest for the ospf packet - their digest + our digest. */
+
+On systems which do not HAVE_IPV6 or where configure was run with
+--disable-ipv6 zebra 0.93b ignores the hostname specified with the -A
+option and only recognizes the port specified with the -P option. This
+happens with FreeBSD as mentioned by Mike Tancsa in his posting
+http://marc.theaimsgroup.com/?l=zebra&m=105118701805977 on the zebra
+mailing list but the issue is not limited to this OS. This patch enables
+the specification of hostname on systems which HAVE_GETADDRINFO
+regardless of the IP version. This fixes the problem on FreeBSD and
+possibly other OSs. Tested on FreeBSD 4.8, RedHat 9 and Solaris 9.
+2003-07-24 [EMAIL PROTECTED]
+
+--- lib/vty.c.orig 2002-08-18 16:49:50.000000000 +0200
++++ lib/vty.c 2003-07-24 21:41:24.000000000 +0200
+@@ -1700,7 +1700,7 @@
+ return 0;
+ }
+
+-#if defined(HAVE_IPV6) && !defined(NRL)
++#if (defined(HAVE_IPV6) && !defined(NRL)) || defined (HAVE_GETADDRINFO)
+ void
+ vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
+ {
+@@ -1972,7 +1972,11 @@
+ vty_serv_sock_addrinfo (hostname, port);
+ #endif /* NRL*/
+ #else /* ! HAVE_IPV6 */
++#ifdef HAVE_GETADDRINFO
++ vty_serv_sock_addrinfo (hostname, port);
++#else /* ! HAVE_GETADDRINFO */
+ vty_serv_sock_family (port, AF_INET);
++#endif /* HAVE_GETADDRINFO */
+ #endif /* HAVE_IPV6 */
+ }
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]