Просмотр исходного кода

upgrading package: zebra 0.93b -> 0.94

Ralf S. Engelschall 22 лет назад
Родитель
Сommit
9df089d482
2 измененных файлов с 19 добавлено и 328 удалено
  1. 17 326
      zebra/zebra.patch
  2. 2 2
      zebra/zebra.spec

+ 17 - 326
zebra/zebra.patch

@@ -1,7 +1,19 @@
+Index: bgpd/bgp_aspath.c
+--- bgpd/bgp_aspath.c.orig	2003-11-04 19:00:42.000000000 +0100
++++ bgpd/bgp_aspath.c	2003-11-27 09:46:59.000000000 +0100
+@@ -1170,7 +1170,7 @@
+ 
+   as = (struct aspath *) backet->data;
+ 
+-  vty_out (vty, "[%p:%d] (%ld) ", backet, backet->key, as->refcnt);
++  vty_out (vty, "[%p:%u] (%ld) ", backet, backet->key, as->refcnt);
+   vty_out (vty, "%s%s", as->str, VTY_NEWLINE);
+ }
+ 
 Index: lib/vty.h
---- lib/vty.h.orig	2002-08-18 16:34:00.000000000 +0200
-+++ lib/vty.h	2003-11-13 20:03:55.000000000 +0100
-@@ -128,7 +128,7 @@
+--- lib/vty.h.orig	2003-11-04 19:00:42.000000000 +0100
++++ lib/vty.h	2003-11-27 09:46:59.000000000 +0100
+@@ -129,7 +129,7 @@
  };
  
  /* Integrated configuration file. */
@@ -10,33 +22,9 @@ Index: lib/vty.h
  
  /* Small macro to determine newline is newline only or linefeed needed. */
  #define VTY_NEWLINE  ((vty->type == VTY_TERM) ? "\r\n" : "\n")
-Index: lib/vty.c
---- lib/vty.c.orig	2003-11-13 20:03:55.000000000 +0100
-+++ lib/vty.c	2003-11-13 20:04:59.000000000 +0100
-@@ -1138,13 +1138,16 @@
-       break;
-     case SE: 
-       {
--	char *buffer = (char *)vty->sb_buffer->head->data;
--	int length = vty->sb_buffer->length;
-+	char *buffer;
-+	int length;
- 
--	if (buffer == NULL)
-+	if (!vty->iac_sb_in_progress)
- 	  return 0;
- 
--	if (!vty->iac_sb_in_progress)
-+	buffer = (char *)vty->sb_buffer->head->data;
-+	length = vty->sb_buffer->length;
-+
-+	if (buffer == NULL)
- 	  return 0;
- 
- 	if (buffer[0] == '\0')
 Index: zebra/ioctl.c
---- zebra/ioctl.c.orig	2001-10-23 10:31:29.000000000 +0200
-+++ zebra/ioctl.c	2003-11-13 20:03:55.000000000 +0100
+--- zebra/ioctl.c.orig	2003-11-04 19:00:42.000000000 +0100
++++ zebra/ioctl.c	2003-11-27 09:46:59.000000000 +0100
 @@ -349,6 +349,7 @@
    int ret;
    struct ifreq ifreq;
@@ -63,300 +51,3 @@ Index: zebra/ioctl.c
    
    addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; 
    addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; 
-Index: zebra/rt_netlink.c
---- zebra/rt_netlink.c.orig	2002-09-10 11:01:35.000000000 +0200
-+++ zebra/rt_netlink.c	2003-11-13 20:04:35.000000000 +0100
-@@ -46,9 +46,8 @@
-   int seq;
-   struct sockaddr_nl snl;
-   char *name;
--} netlink =	{ -1, 0, {0}, "netlink-listen" },	/* kernel messages */
--  netlink_cmd = { -1, 0, {0}, "netlink-cmd" },          /* command channel */
--  netlink_addr = {-1, 0, {0}, "netlink-addr" };		/* address channel */
-+} netlink_sock ={ -1, 0, {0}, "netlink-listen" },	/* kernel messages */
-+  netlink_cmd = { -1, 0, {0}, "netlink-cmd" };          /* command channel */
- 
- struct message nlmsg_str[] =
- {
-@@ -206,6 +205,13 @@
- 	  return -1;
- 	}
- 
-+      /* JF: Ignore messages that aren't from the kernel */
-+      if ( snl.nl_pid != 0 )
-+        {
-+          zlog ( NULL, LOG_ERR, "Ignoring message from pid %u", snl.nl_pid );
-+        continue;
-+      }
-+
-       for (h = (struct nlmsghdr *) buf; NLMSG_OK (h, status); 
- 	   h = NLMSG_NEXT (h, status))
- 	{
-@@ -1108,7 +1114,7 @@
-   snl.nl_family = AF_NETLINK;
- 
-   /* Talk to netlink socket. */
--  ret = netlink_talk (&req.n, &netlink);
-+  ret = netlink_talk (&req.n, &netlink_sock);
-   if (ret < 0)
-     return -1;
- 
-@@ -1342,7 +1348,7 @@
-   if (family == AF_INET)
-     nl = &netlink_cmd;
-   else
--    nl = &netlink;
-+    nl = &netlink_sock;
- 
-   /* Talk to netlink socket. */
-   return netlink_talk (&req.n, nl);
-@@ -1456,8 +1462,8 @@
-   int sock;
- 
-   sock = THREAD_FD (thread);
--  ret = netlink_parse_info (netlink_information_fetch, &netlink);
--  thread_add_read (master, kernel_read, NULL, netlink.sock);
-+  ret = netlink_parse_info (netlink_information_fetch, &netlink_sock);
-+  thread_add_read (master, kernel_read, NULL, netlink_sock.sock);
- 
-   return 0;
- }
-@@ -1473,10 +1479,10 @@
- #ifdef HAVE_IPV6
-   groups |= RTMGRP_IPV6_ROUTE|RTMGRP_IPV6_IFADDR;
- #endif /* HAVE_IPV6 */
--  netlink_socket (&netlink, groups);
-+  netlink_socket (&netlink_sock, groups);
-   netlink_socket (&netlink_cmd, 0);
- 
-   /* Register kernel socket. */
--  if (netlink.sock > 0)
--    thread_add_read (master, kernel_read, NULL, netlink.sock);
-+  if (netlink_sock.sock > 0)
-+    thread_add_read (master, kernel_read, NULL, netlink_sock.sock);
- }
-Index: bgpd/bgp_aspath.c
---- bgpd/bgp_aspath.c.orig	2002-06-19 10:58:03.000000000 +0200
-+++ bgpd/bgp_aspath.c	2003-11-13 20:09:33.000000000 +0100
-@@ -1117,13 +1117,16 @@
- {
-   unsigned int key = 0;
-   int length;
--  caddr_t pnt;
-+  unsigned short *pnt;
- 
--  length = aspath->length;
--  pnt = aspath->data;
-+  length = aspath->length / 2;
-+  pnt = (unsigned short *) aspath->data;
- 
-   while (length)
--    key += pnt[--length];
-+    {
-+      key += *pnt++;
-+      length--;
-+    }
- 
-   return key;
- }
-@@ -1143,7 +1146,7 @@
- void
- aspath_init ()
- {
--  ashash = hash_create (aspath_key_make, aspath_cmp);
-+  ashash = hash_create_size (131072, aspath_key_make, aspath_cmp);
- }
- 
- /* return and as path value */
-@@ -1167,7 +1170,7 @@
- 
-   as = (struct aspath *) backet->data;
- 
--  vty_out (vty, "[%p:%d] (%ld) ", backet, backet->key, as->refcnt);
-+  vty_out (vty, "[%p:%u] (%ld) ", backet, backet->key, as->refcnt);
-   vty_out (vty, "%s%s", as->str, VTY_NEWLINE);
- }
- 
-Index: bgpd/bgp_packet.c
---- bgpd/bgp_packet.c.orig	2002-08-20 17:31:54.000000000 +0200
-+++ bgpd/bgp_packet.c	2003-11-13 20:03:55.000000000 +0100
-@@ -238,7 +238,6 @@
-       bgp_packet_set_size (s);
-       packet = bgp_packet_dup (s);
-       bgp_packet_add (peer, packet);
--      BGP_WRITE_ON (peer->t_write, bgp_write, peer->fd);
-       stream_reset (s);
-       return packet;
-     }
-Index: bgpd/bgp_route.c
---- bgpd/bgp_route.c.orig	2002-08-20 17:06:41.000000000 +0200
-+++ bgpd/bgp_route.c	2003-11-13 20:03:55.000000000 +0100
-@@ -620,7 +620,10 @@
-   if (transparent || reflect
-       || (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED)
- 	  && ((p->family == AF_INET && attr->nexthop.s_addr)
--	      || (p->family == AF_INET6 && ri->peer != bgp->peer_self))))
-+#ifdef HAVE_IPV6
-+	      || (p->family == AF_INET6 && ri->peer != bgp->peer_self)
-+#endif /* HAVE_IPV6 */
-+	      )))
-     {
-       /* NEXT-HOP Unchanged. */
-     }
-@@ -2859,7 +2862,7 @@
-     if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
-       {
- 	bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
--	bgp_aggregate_route (bgp, &rn->p, ri, safi, safi, NULL, aggregate);
-+	bgp_aggregate_route (bgp, &rn->p, ri, afi, safi, NULL, aggregate);
-       }
-   bgp_unlock_node (child);
- }
-@@ -2886,7 +2889,7 @@
-     if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
-       {
- 	bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
--	bgp_aggregate_route (bgp, &rn->p, NULL, safi, safi, del, aggregate);
-+	bgp_aggregate_route (bgp, &rn->p, NULL, afi, safi, del, aggregate);
-       }
-   bgp_unlock_node (child);
- }
-Index: bgpd/bgpd.c
---- bgpd/bgpd.c.orig	2002-08-21 05:53:35.000000000 +0200
-+++ bgpd/bgpd.c	2003-11-13 20:03:55.000000000 +0100
-@@ -797,6 +797,13 @@
-   type = peer_sort (peer);
-   peer->as = as;
- 
-+  if (bgp_config_check (peer->bgp, BGP_CONFIG_CONFEDERATION)
-+      && ! bgp_confederation_peers_check (peer->bgp, as)
-+      && peer->bgp->as != as)
-+    peer->local_as = peer->bgp->confed_id;
-+  else
-+    peer->local_as = peer->bgp->as;
-+
-   /* Advertisement-interval reset */
-   if (peer_sort (peer) == BGP_PEER_IBGP)
-     peer->v_routeadv = BGP_DEFAULT_IBGP_ROUTEADV;
-Index: ripd/ripd.c
---- ripd/ripd.c.orig	2002-07-01 02:57:22.000000000 +0200
-+++ ripd/ripd.c	2003-11-13 20:03:55.000000000 +0100
-@@ -51,6 +51,10 @@
- 
- /* RIP queries. */
- long rip_global_queries = 0;
-+
-+/* Should we trust netmasks or rather apply_classful_mask_ipv4()
-+   in rip_output_process() ? */
-+char rip_should_trust_netmasks = 0;
- 
- /* Prototypes. */
- void rip_event (enum rip_event, int);
-@@ -1963,7 +1967,9 @@
- 	      zlog_info("%s/%d before RIPv1 mask check ",
- 			inet_ntoa (classfull.prefix), classfull.prefixlen);
- 
--	    apply_classful_mask_ipv4 (&classfull);
-+		if (!rip_should_trust_netmasks)
-+		  apply_classful_mask_ipv4 (&classfull);
-+
- 	    p = &classfull;
- 
- 	    if (IS_RIP_DEBUG_PACKET)
-@@ -2705,6 +2711,26 @@
- 
-   return CMD_SUCCESS;
- }
-+
-+DEFUN (rip_trust_netmasks,
-+       rip_trust_netmasks_cmd,
-+       "trust netmasks",
-+       "Tell Zebra to trust netmasks and not to recalculate them.\n"
-+       "Netmasks will be trusted.\n")
-+{
-+  rip_should_trust_netmasks = 1;
-+  return CMD_SUCCESS;
-+}
-+
-+DEFUN (no_rip_trust_netmasks,
-+       no_rip_trust_netmasks_cmd,
-+       "no trust netmasks",
-+       "Tell Zebra not to trust netmasks and recalculate them.\n"
-+       "Netmasks will be recalculated.\n")
-+{
-+  rip_should_trust_netmasks = 0;
-+  return CMD_SUCCESS;
-+}
- 
- struct route_table *rip_distance_table;
- 
-@@ -3503,6 +3529,8 @@
-   install_element (RIP_NODE, &no_rip_distance_source_cmd);
-   install_element (RIP_NODE, &rip_distance_source_access_list_cmd);
-   install_element (RIP_NODE, &no_rip_distance_source_access_list_cmd);
-+  install_element (RIP_NODE, &rip_trust_netmasks_cmd);
-+  install_element (RIP_NODE, &no_rip_trust_netmasks_cmd);
- 
-   /* Debug related init. */
-   rip_debug_init ();
-Index: ospfd/ospf_packet.c
---- ospfd/ospf_packet.c.orig	2003-11-13 20:05:23.000000000 +0100
-+++ ospfd/ospf_packet.c	2003-11-13 20:05:41.000000000 +0100
-@@ -312,6 +312,7 @@
-   struct md5_ctx ctx;
-   void *ibuf;
-   unsigned long oldputp;
-+  u_int32_t t;
-   struct crypt_key *ck;
-   char *auth_key;
- 
-@@ -323,7 +324,9 @@
- 
-   /* We do this here so when we dup a packet, we don't have to
-      waste CPU rewriting other headers. */
--  ospfh->u.crypt.crypt_seqnum = htonl (oi->crypt_seqnum++);
-+  t = (time(NULL) & 0xFFFFFFFF);
-+  oi->crypt_seqnum = ( t > oi->crypt_seqnum ? t : oi->crypt_seqnum++);
-+  ospfh->u.crypt.crypt_seqnum = htonl (oi->crypt_seqnum); 
- 
-   /* Get MD5 Authentication key from auth_key list. */
-   if (list_isempty (OSPF_IF_PARAM (oi, auth_crypt)))
-Index: ospfd/ospf_interface.c
---- ospfd/ospf_interface.c.orig	2002-07-04 07:06:40.000000000 +0200
-+++ ospfd/ospf_interface.c	2003-11-13 20:05:52.000000000 +0100
-@@ -429,6 +429,8 @@
-      if (oi->on_write_q)
-        {
- 	 listnode_delete (ospf_top->oi_write_q, oi);
-+         if (list_isempty(ospf_top->oi_write_q))
-+           OSPF_TIMER_OFF (ospf_top->t_write);
- 	 oi->on_write_q = 0;
-        }
-     }
-Index: ospfd/ospf_vty.c
---- ospfd/ospf_vty.c.orig	2002-07-12 13:42:02.000000000 +0200
-+++ ospfd/ospf_vty.c	2003-11-13 20:06:05.000000000 +0100
-@@ -3764,9 +3764,9 @@
- #ifdef HAVE_OPAQUE_LSA
-   else if (strncmp (argv[0], "opaque-l", 8) == 0)
-     type = OSPF_OPAQUE_LINK_LSA;
--  else if (strncmp (argv[0], "opaque-a", 8) == 0)
-+  else if (strncmp (argv[0], "opaque-ar", 9) == 0)
-     type = OSPF_OPAQUE_AREA_LSA;
--  else if (strncmp (argv[0], "opaque-e", 8) == 0)
-+  else if (strncmp (argv[0], "opaque-as", 9) == 0)
-     type = OSPF_OPAQUE_AS_LSA;
- #endif /* HAVE_OPAQUE_LSA */
-   else
-@@ -3888,9 +3888,9 @@
- #ifdef HAVE_OPAQUE_LSA
-   else if (strncmp (argv[0], "opaque-l", 8) == 0)
-     type = OSPF_OPAQUE_LINK_LSA;
--  else if (strncmp (argv[0], "opaque-a", 8) == 0)
-+  else if (strncmp (argv[0], "opaque-ar", 9) == 0)
-     type = OSPF_OPAQUE_AREA_LSA;
--  else if (strncmp (argv[0], "opaque-e", 8) == 0)
-+  else if (strncmp (argv[0], "opaque-as", 9) == 0)
-     type = OSPF_OPAQUE_AS_LSA;
- #endif /* HAVE_OPAQUE_LSA */
-   else

+ 2 - 2
zebra/zebra.spec

@@ -32,8 +32,8 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [BASE]
 Group:        Network
 License:      GPL
-Version:      0.93b
-Release:      20031113
+Version:      0.94
+Release:      20031127
 
 #   list of sources
 Source0:      ftp://ftp.zebra.org/pub/zebra/zebra-%{version}.tar.gz