[Midnightbsd-cvs] mports: mports/net: Add zebra.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Feb 27 13:55:45 EST 2008


Log Message:
-----------
Add zebra.

Modified Files:
--------------
    mports/net:
        Makefile (r1.61 -> r1.62)

Added Files:
-----------
    mports/net/zebra:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/net/zebra/files:
        patch-configure (r1.1)
        patch-ioctl.c (r1.1)
        patch-ospfd__ospf_spf.c (r1.1)
        patch-ospfd_ospf_lsa.c (r1.1)
        patch-zebra_Makefile.in (r1.1)
        pkg-message.in (r1.1)
        zebractl.sh (r1.1)

-------------- next part --------------
--- /dev/null
+++ net/zebra/pkg-descr
@@ -0,0 +1,15 @@
+GNU Zebra is a free software (distributed under GNU Generic Public
+License) which manages TCP/IP based routing protocols.
+
+It supports BGP-4 protocol as described in RFC1771 (A Border Gateway
+Protocol 4) and RIPv1, RIPv2 and OSPFv2.
+
+Zebra uses multithread technology under multithread supported UNIX
+kernels.  However it can be run under not-multithread supported
+UNIX kernels.
+
+Zebra is intended to be used as a Route Server and a Route Reflector.
+Zebra is not a toolkit, it provides full routing power under a new
+architecture.
+
+WWW: http://www.zebra.org/
--- /dev/null
+++ net/zebra/pkg-plist
@@ -0,0 +1,17 @@
+%%BGPD%%sbin/bgpd
+%%OSPF6D%%sbin/ospf6d
+%%OSPFD%%sbin/ospfd
+%%RIPD%%sbin/ripd
+%%RIPNGD%%sbin/ripngd
+sbin/zebra
+sbin/zebractl
+%%VTYSH%%bin/vtysh
+%%BGPD%%etc/zebra/bgpd.conf.sample
+%%BGPD%%etc/zebra/bgpd.conf.sample2
+%%OSPF6D%%etc/zebra/ospf6d.conf.sample
+%%OSPFD%%etc/zebra/ospfd.conf.sample
+%%RIPD%%etc/zebra/ripd.conf.sample
+%%RIPNGD%%etc/zebra/ripngd.conf.sample
+%%VTYSH%%etc/zebra/vtysh.conf.sample
+etc/zebra/zebra.conf.sample
+ at dirrm etc/zebra
--- /dev/null
+++ net/zebra/Makefile
@@ -0,0 +1,120 @@
+# New ports collection makefile for:	zebra
+# Date created:		27 Feb 2008
+# Whom:			Lucas Holt <luke at midnightbsd.org>
+#
+# $MidnightBSD: mports/net/zebra/Makefile,v 1.1 2008/02/27 18:55:43 laffer1 Exp $
+#
+
+PORTNAME=	zebra
+PORTVERSION=	0.95a
+CATEGORIES=	net ipv6
+MASTER_SITES=	ftp://ftp.zebra.org/pub/zebra/ \
+		ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
+		ftp://ftp.sunet.se/pub/network/zebra/ \
+		ftp://6bone.informatik.uni-leipzig.de/pub/ftp.zebra.org/pub/zebra/ \
+		ftp://ftp.pop-pr.rnp.br/pub/GNU/ftp.zebra.org/zebra/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
+
+CONFLICTS=	openbgpd-[0-9]* quagga-[0-9]*
+
+PKGMESSAGE=	${WRKDIR}/pkg-message
+SUB_FILES=	pkg-message
+USE_SUBMAKE=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS+=	--sysconfdir=${PREFIX}/etc/zebra
+SCRIPTS_ENV=	WRKDIRPREFIX=${WRKDIRPREFIX}
+
+OPTIONS=	IPV6 "enable IPv6 support" on \
+		LIBPAM "enable PAM authentication for vtysh" off \
+		OSPFNSSA "turn on undergoing NSSA feature" off \
+		SNMP "enable SNMP support" off \
+		TCPZEBRA "enable TCP/IP socket connection" off \
+		BGPD "enable BGPD" on \
+		OSPF6D "enable OSPF6D" on \
+		OSPFD "enable OSPFD" on \
+		RIPD "enable RIPD" on \
+		RIPNGD "enable RIPNGD" on \
+		VTYSH "enable VTYSH" on
+
+MAN1=		vtysh.1
+MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
+INFO=		zebra
+
+.include <bsd.port.pre.mk>
+
+.if defined (WITHOUT_IPV6)
+CONFIGURE_ARGS+=--disable-ipv6
+WITHOUT_OSPF6D=	yes
+WITHOUT_RIPNGD=	yes
+.endif
+
+.if defined (WITH_LIBPAM)
+CONFIGURE_ARGS+=--with-libpam
+.endif
+
+.if defined (WITH_OSPFNSSA)
+CONFIGURE_ARGS+=--enable-nssa
+.endif
+
+.if defined (WITH_SNMP)
+CONFIGURE_ARGS+=--enable-snmp
+LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install
+.endif
+
+.if defined (WITH_TCPZEBRA)
+CONFIGURE_ARGS+=--enable-tcp-zebra
+.endif
+
+.if !defined(WITHOUT_BGPD)
+PLIST_SUB+=	BGPD=""
+.else
+CONFIGURE_ARGS+=--disable-bgpd
+PLIST_SUB+=	BGPD="@comment "
+.endif
+
+.if !defined(WITHOUT_OSPF6D)
+PLIST_SUB+=	OSPF6D=""
+.else
+CONFIGURE_ARGS+=--disable-ospf6d
+PLIST_SUB+=	OSPF6D="@comment "
+.endif
+
+.if !defined(WITHOUT_OSPFD)
+PLIST_SUB+=	OSPF6D=""
+PLIST_SUB+=	OSPFD=""
+.else
+CONFIGURE_ARGS+=--disable-ospfd
+PLIST_SUB+=	OSPFD="@comment "
+.endif
+
+.if !defined(WITHOUT_RIPD)
+PLIST_SUB+=	RIPD=""
+.else
+CONFIGURE_ARGS+=--disable-ripd
+PLIST_SUB+=	RIPD="@comment "
+.endif
+
+.if !defined(WITHOUT_RIPNGD)
+PLIST_SUB+=	RIPNGD=""
+.else
+CONFIGURE_ARGS+=--disable-ripngd
+PLIST_SUB+=	RIPNGD="@comment "
+.endif
+
+.if !defined(WITHOUT_VTYSH)
+PLIST_SUB+=	VTYSH=""
+CONFIGURE_ARGS+=--enable-vtysh
+.else
+PLIST_SUB+=	VTYSH="@comment "
+.endif
+
+post-install:
+	@( cd ${WRKSRC}/doc; ${RM} -f zebra*info*; ${MAKE} zebra.info install )
+	@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
+		< ${FILESDIR}/zebractl.sh  \
+		> ${PREFIX}/sbin/zebractl
+	@${CHMOD} 555 ${PREFIX}/sbin/zebractl
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ net/zebra/distinfo
@@ -0,0 +1,3 @@
+MD5 (zebra-0.95a.tar.gz) = 9b8fec2d4f910334e50167414fcf193b
+SHA256 (zebra-0.95a.tar.gz) = e7f8cbb367c325062625c881a97adc4cf6d3d138a25341451193652944888d1f
+SIZE (zebra-0.95a.tar.gz) = 1370152
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/net/Makefile,v
retrieving revision 1.61
retrieving revision 1.62
diff -L net/Makefile -L net/Makefile -u -r1.61 -r1.62
--- net/Makefile
+++ net/Makefile
@@ -68,6 +68,7 @@
     SUBDIR += xmlrpc-c
     SUBDIR += xmlrpc-epi
     SUBDIR += yaz
+    SUBDIR += zebra
     SUBDIR += zillion
     SUBDIR += zniper
     SUBDIR += zsync
--- /dev/null
+++ net/zebra/files/zebractl.sh
@@ -0,0 +1,57 @@
+#! /bin/sh
+#
+# $FreeBSD: ports/net/zebra/files/zebractl.sh,v 1.8 2002/08/04 20:04:50 sumikawa Exp $
+#
+# zebra start/stop script by "Andreas Klemm <andreas at FreeBSD.ORG>"
+#
+
+usage()
+{
+	echo "$0: usage: $0 [ start | stop | restart ]"
+	exit 1
+}
+
+if [ $# -lt 1 ]; then
+	echo "$0: error: one argument needed"; usage
+elif [ $# -gt 1 ]; then
+	echo "$0: error: only one argument needed"; usage
+fi
+
+case $1 in
+	start)
+		if [ ! -f !!PREFIX!!/etc/zebra/zebra.conf ]; then
+			echo "error: zebra.conf config file is mandatory"
+			exit 1
+		fi
+		[ -f !!PREFIX!!/etc/zebra/zebra.conf ] \
+			&& !!PREFIX!!/sbin/zebra -d && echo -n ' zebra'
+		[ -f !!PREFIX!!/etc/zebra/ripd.conf ] \
+			&& !!PREFIX!!/sbin/ripd -d && echo -n ' ripd'
+		[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] \
+			&& !!PREFIX!!/sbin/ripngd -d && echo -n ' ripngd'
+		[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] \
+			&& !!PREFIX!!/sbin/ospfd -d && echo -n ' ospfd'
+		[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] \
+			&& !!PREFIX!!/sbin/ospf6d -d && echo -n ' ospf6d'
+		[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] \
+			&& !!PREFIX!!/sbin/bgpd -d && echo -n ' bgpd'
+		;;
+
+	stop)
+		[ -f !!PREFIX!!/etc/zebra/ripd.conf ] && killall ripd
+		[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] && killall ripngd
+		[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] && killall ospfd
+		[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] && killall ospf6d
+		[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] && killall bgpd
+		[ -f !!PREFIX!!/etc/zebra/zebra.conf ] &&  killall zebra
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+
+	*)	echo "$0: error: unknown option $1"
+		usage
+		;;
+esac
+exit 0
--- /dev/null
+++ net/zebra/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig	Thu May 19 11:13:47 2005
++++ configure		Thu May 19 11:15:55 2005
+@@ -5772,6 +5772,8 @@
+                      zebra_ipforward_path="proc";;
+   "/dev/ip")
+                      case "$host" in
++		       *-freebsd-*)   IPFORWARD=ipforward_sysctl.o
++				      zebra_ipforward_path="sysctl";; 
+ 		       *-linux-*)     IPFORWARD=ipforward_proc.o
+ 				      zebra_ipforward_path="proc";;
+                        *-nec-sysv4*)  IPFORWARD=ipforward_ews.o
--- /dev/null
+++ net/zebra/files/pkg-message.in
@@ -0,0 +1,6 @@
+To run zebra you should add in your /etc/rc.conf these lines:
+
+defaultrouter="NO"
+router_enable="YES"
+router="%%PREFIX%%/sbin/zebractl"
+router_flags="start"
--- /dev/null
+++ net/zebra/files/patch-ospfd_ospf_lsa.c
@@ -0,0 +1,37 @@
+--- ospfd/ospf_lsa.c.orig	Mon Feb 28 03:09:10 2005
++++ ospfd/ospf_lsa.c	Thu May 19 17:59:09 2005
+@@ -3324,6 +3324,7 @@
+   listnode node;
+   struct ospf *ospf = THREAD_ARG (t);
+   int i;
++  time_t ct;
+   list lsa_to_refresh = list_new ();
+ 
+   if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
+@@ -3331,15 +3332,25 @@
+ 
+   
+   i = ospf->lsa_refresh_queue.index;
++
++  if ((ct = time(NULL)) < ospf->lsa_refresher_started) {
++    zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): HACK: fixing lsa_refresher_started: %d -> %d", ospf->lsa_refresher_started, ct);
++    ospf->lsa_refresher_started = ct;
++  }
+   
+   ospf->lsa_refresh_queue.index =
+     (ospf->lsa_refresh_queue.index +
+-     (time (NULL) - ospf->lsa_refresher_started) / OSPF_LSA_REFRESHER_GRANULARITY)
++     (ct - ospf->lsa_refresher_started) / OSPF_LSA_REFRESHER_GRANULARITY)
+     % OSPF_LSA_REFRESHER_SLOTS;
+ 
+   if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
+     zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): next index %d",
+ 	       ospf->lsa_refresh_queue.index);
++
++  if (ospf->lsa_refresh_queue.index >= OSPF_LSA_REFRESHER_SLOTS) {
++    zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): HACK: fixing index: %hu -> 0", ospf->lsa_refresh_queue.index);
++    ospf->lsa_refresh_queue.index = 0;
++  }
+ 
+   for (;i != ospf->lsa_refresh_queue.index;
+        i = (i + 1) % OSPF_LSA_REFRESHER_SLOTS)
--- /dev/null
+++ net/zebra/files/patch-zebra_Makefile.in
@@ -0,0 +1,11 @@
+--- zebra/Makefile.in.orig	Sat Jun 29 15:26:54 2002
++++ zebra/Makefile.in	Wed Jul 24 19:16:06 2002
+@@ -404,7 +404,7 @@
+ 
+ 
+ #client : client_main.o ../lib/libzebra.a
+-#	$(CC) -g -o client client_main.o ../lib/libzebra.a $(LIBS) $(LIB_IPV6)
++#	$(CC) -o client client_main.o ../lib/libzebra.a $(LIBS) $(LIB_IPV6)
+ 
+ install-sysconfDATA: $(sysconf_DATA)
+ 	@$(NORMAL_INSTALL)
--- /dev/null
+++ net/zebra/files/patch-ospfd__ospf_spf.c
@@ -0,0 +1,291 @@
+Index: ospfd/ospf_spf.c
+===================================================================
+RCS file: /cvsroot/zebra/ospfd/ospf_spf.c,v
+retrieving revision 1.124
+diff -u -r1.124 ospf_spf.c
+--- ospfd/ospf_spf.c	28 Mar 2003 19:55:28 -0000	1.124
++++ ospfd/ospf_spf.c	22 Feb 2006 03:03:26 -0000
+@@ -29,6 +29,7 @@
+ #include "table.h"
+ #include "log.h"
+ #include "sockunion.h"          /* for inet_ntop () */
++#include "pqueue.h"
+ 
+ #include "ospfd/ospfd.h"
+ #include "ospfd/ospf_interface.h"
+@@ -114,7 +115,7 @@
+ }
+ 
+ void
+-ospf_vertex_add_parent (struct vertex *v)
++ospf_vertex_connect_to_parent (struct vertex *v)
+ {
+   struct vertex_nexthop *nh;
+   listnode node;
+@@ -458,48 +459,36 @@
+     }
+ }
+ 
+-void
+-ospf_install_candidate (list candidate, struct vertex *w)
++int
++ospf_vertex_cmp (void *a, void *b)
+ {
+-  listnode node;
+-  struct vertex *cw;
+-
+-  if (list_isempty (candidate))
+-    {
+-      listnode_add (candidate, w);
+-      return;
+-    }
++  struct vertex *va = (struct vertex *) a;
++  struct vertex *vb = (struct vertex *) b;
++  /* ascending order */
++  return (va->distance - vb->distance);
++}
+ 
+-  /* Install vertex with sorting by distance. */
+-  for (node = listhead (candidate); node; nextnode (node))
+-    {
+-      cw = (struct vertex *) getdata (node);
+-      if (cw->distance > w->distance)
+-        {
+-          list_add_node_prev (candidate, node, w);
+-          break;
+-        }
+-      else if (node->next == NULL)
+-        {
+-          list_add_node_next (candidate, node, w);
+-          break;
+-        }
+-    }
++void
++ospf_install_candidate (struct pqueue *candidate_list, struct vertex *w)
++{
++  if (IS_DEBUG_OSPF_EVENT)
++    zlog_info ("candidate: type: %d id: %s p: %p distance: %lu",
++               w->type, inet_ntoa (w->id), w, (u_long)w->distance);
++  pqueue_enqueue (w, candidate_list);
+ }
+ 
+ /* RFC2328 Section 16.1 (2). */
+ void
+ ospf_spf_next (struct vertex *v, struct ospf_area *area,
+-               list candidate, struct route_table *rv,
++               struct pqueue *candidate_list, struct route_table *rv,
+                struct route_table *nv)
+ {
+   struct ospf_lsa *w_lsa = NULL;
+-  struct vertex *w, *cw;
++  struct vertex *w;
+   u_char *p;
+   u_char *lim;
+   struct router_lsa_link *l = NULL;
+   struct in_addr *r;
+-  listnode node;
+   int type = 0;
+ 
+   /* If this is a router-LSA, and bit V of the router-LSA (see Section
+@@ -618,58 +607,22 @@
+       else
+         w->distance = v->distance;
+ 
+-      /* Is there already vertex W in candidate list? */
+-      node = ospf_vertex_lookup (candidate, w->id, w->type);
+-      if (node == NULL)
+-        {
+-          /* Calculate nexthop to W. */
+-          ospf_nexthop_calculation (area, v, w);
+-
+-          ospf_install_candidate (candidate, w);
+-        }
+-      else
+-        {
+-          cw = (struct vertex *) getdata (node);
+-
+-          /* if D is greater than. */
+-          if (cw->distance < w->distance)
+-            {
+-              ospf_vertex_free (w);
+-              continue;
+-            }
+-          /* equal to. */
+-          else if (cw->distance == w->distance)
+-            {
+-              /* Calculate nexthop to W. */
+-              ospf_nexthop_calculation (area, v, w);
+-              ospf_nexthop_merge (cw->nexthop, w->nexthop);
+-              list_delete_all_node (w->nexthop);
+-              ospf_vertex_free (w);
+-            }
+-          /* less than. */
+-          else
+-            {
+-              /* Calculate nexthop. */
+-              ospf_nexthop_calculation (area, v, w);
+-
+-              /* Remove old vertex from candidate list. */
+-              ospf_vertex_free (cw);
+-              listnode_delete (candidate, cw);
++      /* calculate nexthop */
++      ospf_nexthop_calculation (area, v, w);
+ 
+-              /* Install new to candidate. */
+-              ospf_install_candidate (candidate, w);
+-            }
+-        }
++      /* install candidate */
++      ospf_install_candidate (candidate_list, w);
+     }
+ }
+ 
+ /* Add vertex V to SPF tree. */
+-void
++struct vertex *
+ ospf_spf_register (struct vertex *v, struct route_table *rv,
+ 		   struct route_table *nv)
+ {
+   struct prefix p;
+   struct route_node *rn;
++  struct vertex *cv;
+ 
+   p.family = AF_INET;
+   p.prefixlen = IPV4_MAX_BITLEN;
+@@ -680,7 +633,39 @@
+   else
+     rn = route_node_get (nv, &p);
+ 
+-  rn->info = v;
++  cv = rn->info;
++
++  /* if the route does not exist yet, just install and return */
++  if (! cv)
++    {
++      rn->info = v;
++      return v;
++    }
++
++  /* if D is greater than. */
++  if (cv->distance < v->distance)
++    ospf_vertex_free (v);
++
++  /* equal to. */
++  else if (cv->distance == v->distance)
++    {
++      /* Merge nexthop to D. */
++      ospf_nexthop_merge (cv->nexthop, v->nexthop);
++      list_delete_all_node (v->nexthop);
++      ospf_vertex_free (v);
++    }
++
++  /* less than. */
++  else
++    {
++      /* As long as sorting in the candidate_list works,
++      cv->distance never become more than v->distance
++      (i.e. (cv->distance > v->distance) should not happen). */
++      assert (0);
++    }
++
++  /* the vertex is dropped anyway */
++  return NULL;
+ }
+ 
+ void
+@@ -709,6 +694,7 @@
+   listnode cnode;
+   listnode nnode;
+   struct vertex_nexthop *nexthop;
++  struct vertex *w;
+ 
+   if (v->type == OSPF_VERTEX_ROUTER)
+     {
+@@ -734,8 +720,8 @@
+ 
+   for (cnode = listhead (v->child); cnode; nextnode (cnode))
+     {
+-      v = getdata (cnode);
+-      ospf_spf_dump (v, i);
++      w = getdata (cnode);
++      ospf_spf_dump (w, i);
+     }
+ }
+ 
+@@ -895,8 +881,7 @@
+ ospf_spf_calculate (struct ospf_area *area, struct route_table *new_table, 
+                     struct route_table *new_rtrs)
+ {
+-  list candidate;
+-  listnode node;
++  struct pqueue *candidate_list;
+   struct vertex *v;
+   struct route_table *rv;
+   struct route_table *nv;
+@@ -925,7 +910,8 @@
+   nv = route_table_init ();
+ 
+   /* Clear the list of candidate vertices. */ 
+-  candidate = list_new ();
++  candidate_list = pqueue_create ();
++  candidate_list->cmp = ospf_vertex_cmp;
+ 
+   /* Initialize the shortest-path tree to only the root (which is the
+      router doing the calculation). */
+@@ -939,29 +925,37 @@
+ 
+   for (;;)
+     {
+-      /* RFC2328 16.1. (2). */
+-      ospf_spf_next (v, area, candidate, rv, nv);
++      if (v != NULL)
++        {
++          if (IS_DEBUG_OSPF_EVENT)
++            zlog_info ("determined: type: %d id: %s p: %p distance: %lu",
++                       v->type, inet_ntoa (v->id), v, (u_long)v->distance);
++
++          /* RFC2328 16.1. (2). */
++          ospf_spf_next (v, area, candidate_list, rv, nv);
++        }
+ 
+       /* RFC2328 16.1. (3). */
+       /* If at this step the candidate list is empty, the shortest-
+          path tree (of transit vertices) has been completely built and
+          this stage of the procedure terminates. */
+-      if (listcount (candidate) == 0)
++      if (candidate_list->size == 0)
+         break;
+ 
+       /* Otherwise, choose the vertex belonging to the candidate list
+          that is closest to the root, and add it to the shortest-path
+          tree (removing it from the candidate list in the
+          process). */ 
+-      node = listhead (candidate);
+-      v = getdata (node);
+-      ospf_vertex_add_parent (v);
+-
+-      /* Reveve from the candidate list. */
+-      listnode_delete (candidate, v);
++      v = pqueue_dequeue (candidate_list);
+ 
+       /* Add to SPF tree. */
+-      ospf_spf_register (v, rv, nv);
++      v = ospf_spf_register (v, rv, nv);
++
++      /* Skip rest if the vertex is rejected to be installed in SPF tree */
++      if (v == NULL)
++        continue;
++
++      ospf_vertex_connect_to_parent (v);
+ 
+       /* Note that when there is a choice of vertices closest to the
+          root, network vertices must be chosen before router vertices
+@@ -993,7 +987,7 @@
+   ospf_spf_route_free (nv);
+ 
+   /* Free candidate list */
+-  list_free (candidate);
++  pqueue_delete (candidate_list);
+ 
+   /* Increment SPF Calculation Counter. */
+   area->spf_calculation++;
--- /dev/null
+++ net/zebra/files/patch-ioctl.c
@@ -0,0 +1,31 @@
+
+$FreeBSD: ports/net/zebra/files/patch-ioctl.c,v 1.2 2002/10/07 14:43:54 sobomax Exp $
+
+--- zebra/ioctl.c.orig	Tue Oct 23 11:31:29 2001
++++ zebra/ioctl.c	Fri Oct  4 19:45:04 2002
+@@ -349,6 +349,7 @@
+   int ret;
+   struct ifreq ifreq;
+ 
++  bzero(&ifreq, sizeof(struct ifreq));
+   ifreq_set_name (&ifreq, ifp);
+ 
+   ifreq.ifr_flags = ifp->flags;
+@@ -371,6 +372,7 @@
+   int ret;
+   struct ifreq ifreq;
+ 
++  bzero(&ifreq, sizeof(struct ifreq));
+   ifreq_set_name (&ifreq, ifp);
+ 
+   ifreq.ifr_flags = ifp->flags;
+@@ -473,6 +475,9 @@
+   mask.sin6_len = sizeof (struct sockaddr_in6);
+ #endif
+   memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
++
++  addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
++  addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
+   
+   addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; 
+   addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; 


More information about the Midnightbsd-cvs mailing list