diff options
author | sem <sem@FreeBSD.org> | 2008-06-28 11:23:36 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2008-06-28 11:23:36 +0800 |
commit | 44aeafdc86e0aa0b2c41fb5f9d89735936c7a411 (patch) | |
tree | e73b708fb03ba29a3240820948bbf4a34d40d717 | |
parent | fa076d4ff9007e28f62dd191c685f91685374df7 (diff) | |
download | freebsd-ports-gnome-44aeafdc86e0aa0b2c41fb5f9d89735936c7a411.tar.gz freebsd-ports-gnome-44aeafdc86e0aa0b2c41fb5f9d89735936c7a411.tar.zst freebsd-ports-gnome-44aeafdc86e0aa0b2c41fb5f9d89735936c7a411.zip |
- Update to 0.99.10
Submitted by: maintainer
-rw-r--r-- | net/quagga/Makefile | 5 | ||||
-rw-r--r-- | net/quagga/distinfo | 6 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-0-bgp-ipv6 | 198 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-1-prefix_buf | 12 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-10-connroutechange | 175 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-13-ifaddress | 100 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-2-rtm_type_str | 108 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-3-rib_sweep_route | 39 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-4-old_pid | 81 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-5-sndbuf | 20 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-6-pidfile_mask | 30 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-7-inet6debug | 74 | ||||
-rw-r--r-- | net/quagga/files/patch-cvs-9-ipv6ignore | 14 | ||||
-rw-r--r-- | net/quagga/files/quagga.sh.in | 1 |
14 files changed, 6 insertions, 857 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile index 10e85e5851ab..0f1ebf00f735 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -6,8 +6,7 @@ # PORTNAME= quagga -PORTVERSION= 0.99.9 -PORTREVISION= 7 +PORTVERSION= 0.99.10 CATEGORIES= net ipv6 MASTER_SITES= http://quagga.net/download/ \ http://www.ru.quagga.net/download/ \ @@ -110,7 +109,7 @@ CONFIGURE_ARGS+=--enable-rtadv .if defined(WITH_SNMP) CONFIGURE_ARGS+=--enable-snmp -LIB_DEPENDS+=netsnmp.16:${PORTSDIR}/net-mgmt/net-snmp +LIB_DEPENDS+=netsnmp:${PORTSDIR}/net-mgmt/net-snmp .endif .if defined(WITH_TCPSOCKETS) diff --git a/net/quagga/distinfo b/net/quagga/distinfo index ba8f7915fed4..a68b914a096b 100644 --- a/net/quagga/distinfo +++ b/net/quagga/distinfo @@ -1,3 +1,3 @@ -MD5 (quagga-0.99.9.tar.gz) = 4dbdaf91bf6609803819d97d5fccc4c9 -SHA256 (quagga-0.99.9.tar.gz) = 92abf44c5239c8a18762cf27cafd03b46d581f180bc411706314b8b8d1e94db0 -SIZE (quagga-0.99.9.tar.gz) = 2341067 +MD5 (quagga-0.99.10.tar.gz) = c7a2d92e1c42214afef9b2e1cd4b5d06 +SHA256 (quagga-0.99.10.tar.gz) = f27d55904eb9a9eaf61a19b288ac79c9024b341734b984dccc04c343dfce890d +SIZE (quagga-0.99.10.tar.gz) = 2424191 diff --git a/net/quagga/files/patch-cvs-0-bgp-ipv6 b/net/quagga/files/patch-cvs-0-bgp-ipv6 deleted file mode 100644 index 65783d82542b..000000000000 --- a/net/quagga/files/patch-cvs-0-bgp-ipv6 +++ /dev/null @@ -1,198 +0,0 @@ -diff --git bgpd/bgp_open.c bgpd/bgp_open.c -index d4f7cdf..cd23577 100644 ---- bgpd/bgp_open.c -+++ bgpd/bgp_open.c -@@ -177,7 +177,7 @@ bgp_capability_mp (struct peer *peer, struct capability_header *hdr) - peer->afc_recv[mpc.afi][mpc.safi] = 1; - - if (peer->afc[mpc.afi][mpc.safi]) -- peer->afc_nego[mpc.safi][mpc.safi] = 1; -+ peer->afc_nego[mpc.afi][mpc.safi] = 1; - else - return -1; - -diff --git bgpd/bgpd.c bgpd/bgpd.c -diff --git tests/bgp_capability_test.c tests/bgp_capability_test.c -index 5595ecf..4729f5c 100644 ---- tests/bgp_capability_test.c -+++ tests/bgp_capability_test.c -@@ -27,6 +27,14 @@ static struct test_segment { - #define SHOULD_PARSE 0 - #define SHOULD_ERR -1 - int parses; /* whether it should parse or not */ -+ -+ /* AFI/SAFI validation */ -+ int validate_afi; -+ afi_t afi; -+ safi_t safi; -+#define VALID_AFI 1 -+#define INVALID_AFI 0 -+ int afi_valid; - } test_segments [] = - { - /* 0 */ -@@ -53,47 +61,63 @@ static struct test_segment { - { CAPABILITY_CODE_ORF, 0x2, 0x0, 0x0 }, - 4, SHOULD_ERR, - }, -- /* 4 */ -- { "MP1", -+ { NULL, NULL, {0}, 0, 0}, -+}; -+ -+static struct test_segment mp_segments[] = -+{ -+ { "MP4", - "MP IP/Uni", - { 0x1, 0x4, 0x0, 0x1, 0x0, 0x1 }, -- 6, SHOULD_PARSE, -+ 6, SHOULD_PARSE, AFI_IP, SAFI_UNICAST, -+ }, -+ { "MPv6", -+ "MP IPv6/Uni", -+ { 0x1, 0x4, 0x0, 0x2, 0x0, 0x1 }, -+ 6, SHOULD_PARSE, -+ 1, AFI_IP6, SAFI_UNICAST, VALID_AFI, - }, - /* 5 */ - { "MP2", - "MP IP/Multicast", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0x1, 0x0, 0x2 }, -- 6, SHOULD_PARSE, -+ 6, SHOULD_PARSE, -+ 1, AFI_IP, SAFI_MULTICAST, VALID_AFI, - }, - /* 6 */ - { "MP3", - "MP IP6/VPNv4", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0x2, 0x0, 0x80 }, - 6, SHOULD_PARSE, /* parses, but invalid afi,safi */ -+ 1, AFI_IP6, BGP_SAFI_VPNV4, INVALID_AFI, - }, - /* 7 */ - { "MP5", - "MP IP6/MPLS-VPN", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0x2, 0x0, 0x4 }, -- 6, SHOULD_PARSE, -+ 6, SHOULD_PARSE, -+ 1, AFI_IP6, SAFI_MPLS_VPN, VALID_AFI, - }, - /* 8 */ - { "MP6", - "MP IP4/VPNv4", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0x1, 0x0, 0x80 }, -- 6, SHOULD_PARSE, -+ 6, SHOULD_PARSE, -+ 1, AFI_IP, BGP_SAFI_VPNV4, VALID_AFI, - }, - /* 9 */ - { "MP7", - "MP IP4/VPNv6", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0x1, 0x0, 0x81 }, -- 6, SHOULD_PARSE, /* parses, but invalid afi,safi tuple! - manually inspect */ -+ 6, SHOULD_PARSE, /* parses, but invalid afi,safi tuple */ -+ 1, AFI_IP, BGP_SAFI_VPNV6, INVALID_AFI, - }, - /* 10 */ - { "MP8", - "MP unknown AFI", - { CAPABILITY_CODE_MP, 0x4, 0x0, 0xa, 0x0, 0x81 }, -- 6, SHOULD_PARSE, /* parses, but unknown */ -+ 6, SHOULD_PARSE, -+ 1, 0xa, 0x81, INVALID_AFI, /* parses, but unknown */ - }, - /* 11 */ - { "MP-short", -@@ -106,7 +130,13 @@ static struct test_segment { - "MP IP4/Unicast, length too long", - { CAPABILITY_CODE_MP, 0x6, 0x0, 0x1, 0x0, 0x1 }, - 6, SHOULD_ERR, -+ 1, AFI_IP, SAFI_UNICAST, VALID_AFI, - }, -+ { NULL, NULL, {0}, 0, 0} -+}; -+ -+static struct test_segment misc_segments[] = -+{ - /* 13 */ - { "ORF", - "ORF, simple, single entry, single tuple", -@@ -366,6 +396,7 @@ parse_test (struct peer *peer, struct test_segment *t, int type) - { - int ret; - int capability = 0; -+ int oldfailed = failed; - - stream_reset (peer->ibuf); - switch (type) -@@ -398,16 +429,34 @@ parse_test (struct peer *peer, struct test_segment *t, int type) - exit(1); - } - -- printf ("parsed?: %s\n", ret ? "no" : "yes"); -- -- if (ret == t->parses) -- printf ("OK\n"); -- else -+ if (!ret && t->validate_afi) - { -- printf ("failed\n"); -- failed++; -+ safi_t safi = t->safi; -+ -+ if (bgp_afi_safi_valid_indices (t->afi, &safi) != t->afi_valid) -+ failed++; -+ -+ printf ("MP: %u/%u (%u): recv %u, nego %u\n", -+ t->afi, t->safi, safi, -+ peer->afc_recv[t->afi][safi], -+ peer->afc_nego[t->afi][safi]); -+ -+ if (t->afi_valid == VALID_AFI) -+ { -+ -+ if (!peer->afc_recv[t->afi][safi]) -+ failed++; -+ if (!peer->afc_nego[t->afi][safi]) -+ failed++; -+ } - } - -+ printf ("parsed?: %s\n", ret ? "no" : "yes"); -+ -+ if (ret != t->parses) -+ failed++; -+ -+ printf ("%s\n", (failed > oldfailed) ? "[31mfailed![0m" : "[32mOK[0m"); - printf ("\n"); - } - -@@ -439,12 +488,26 @@ main (void) - - for (i = AFI_IP; i < AFI_MAX; i++) - for (j = SAFI_UNICAST; j < SAFI_MAX; j++) -- peer->afc_nego[i][j] = 1; -+ { -+ peer->afc[i][j] = 1; -+ peer->afc_adv[i][j] = 1; -+ } - -- i =0; -+ i = 0; -+ while (mp_segments[i].name) -+ parse_test (peer, &mp_segments[i++], OPEN); -+ -+ /* These tests assume mp_segments tests set at least -+ * one of the afc_nego's -+ */ -+ i = 0; - while (test_segments[i].name) - parse_test (peer, &test_segments[i++], OPEN); - -+ i = 0; -+ while (misc_segments[i].name) -+ parse_test (peer, &misc_segments[i++], OPEN); -+ - SET_FLAG (peer->cap, PEER_CAP_DYNAMIC_ADV); - peer->status = Established; - diff --git a/net/quagga/files/patch-cvs-1-prefix_buf b/net/quagga/files/patch-cvs-1-prefix_buf deleted file mode 100644 index 5ff9aaab74eb..000000000000 --- a/net/quagga/files/patch-cvs-1-prefix_buf +++ /dev/null @@ -1,12 +0,0 @@ ---- zebra/rt_socket.c 13 Aug 2007 16:03:07 -0000 1.13 -+++ zebra/rt_socket.c 12 Sep 2007 13:31:03 -0000 -@@ -207,6 +207,9 @@ - case ZEBRA_ERR_RTNOEXIST: - case ZEBRA_ERR_RTUNREACH: - default: -+ /* This point is reachable regardless of debugging mode. */ -+ if (!IS_ZEBRA_DEBUG_RIB) -+ inet_ntop (AF_INET, &p->u.prefix, prefix_buf, INET_ADDRSTRLEN); - zlog_err ("%s: %s/%d: rtm_write() unexpectedly returned %d for command %s", - __func__, prefix_buf, p->prefixlen, error, LOOKUP (rtm_type_str, cmd)); - break; diff --git a/net/quagga/files/patch-cvs-10-connroutechange b/net/quagga/files/patch-cvs-10-connroutechange deleted file mode 100644 index d2cdfa6d7dc3..000000000000 --- a/net/quagga/files/patch-cvs-10-connroutechange +++ /dev/null @@ -1,175 +0,0 @@ ---- lib/linklist.c 15 Jun 2006 12:43:09 -0000 1.11 -+++ lib/linklist.c 12 Nov 2007 14:41:09 -0000 -@@ -158,6 +158,7 @@ listnode_add_after (struct list *list, s - - pp->next = nn; - } -+ list->count++; - } - - ---- lib/workqueue.c 30 Mar 2006 14:45:47 -0000 1.8 -+++ lib/workqueue.c 12 Nov 2007 14:41:09 -0000 -@@ -66,6 +66,8 @@ work_queue_new (struct thread_master *m, - - new->name = XSTRDUP (MTYPE_WORK_QUEUE_NAME, queue_name); - new->master = m; -+ SET_FLAG (new->flags, WQ_UNPLUGGED); -+ UNSET_FLAG (new->flags, WQ_AIM_HEAD); - - if ( (new->items = list_new ()) == NULL) - { -@@ -103,7 +105,7 @@ static inline int - work_queue_schedule (struct work_queue *wq, unsigned int delay) - { - /* if appropriate, schedule work queue thread */ -- if ( (wq->flags == WQ_UNPLUGGED) -+ if ( CHECK_FLAG (wq->flags, WQ_UNPLUGGED) - && (wq->thread == NULL) - && (listcount (wq->items) > 0) ) - { -@@ -129,7 +131,10 @@ work_queue_add (struct work_queue *wq, v - } - - item->data = data; -- listnode_add (wq->items, item); -+ if (CHECK_FLAG (wq->flags, WQ_AIM_HEAD)) -+ listnode_add_after (wq->items, NULL, item); -+ else -+ listnode_add (wq->items, item); - - work_queue_schedule (wq, wq->spec.hold); - -@@ -186,7 +191,7 @@ DEFUN(show_work_queues, - for (ALL_LIST_ELEMENTS_RO ((&work_queues), node, wq)) - { - vty_out (vty,"%c %8d %5d %8ld %7d %6d %6u %s%s", -- (wq->flags == WQ_PLUGGED ? 'P' : ' '), -+ (CHECK_FLAG (wq->flags, WQ_UNPLUGGED) ? ' ' : 'P'), - listcount (wq->items), - wq->spec.hold, - wq->runs, -@@ -211,7 +216,7 @@ work_queue_plug (struct work_queue *wq) - - wq->thread = NULL; - -- wq->flags = WQ_PLUGGED; -+ UNSET_FLAG (wq->flags, WQ_UNPLUGGED); - } - - /* unplug queue, schedule it again, if appropriate -@@ -220,12 +225,21 @@ work_queue_plug (struct work_queue *wq) - void - work_queue_unplug (struct work_queue *wq) - { -- wq->flags = WQ_UNPLUGGED; -+ SET_FLAG (wq->flags, WQ_UNPLUGGED); - - /* if thread isnt already waiting, add one */ - work_queue_schedule (wq, wq->spec.hold); - } - -+void -+work_queue_aim_head (struct work_queue *wq, const unsigned aim_head) -+{ -+ if (aim_head) -+ SET_FLAG (wq->flags, WQ_AIM_HEAD); -+ else -+ UNSET_FLAG (wq->flags, WQ_AIM_HEAD); -+} -+ - /* timer thread to process a work queue - * will reschedule itself if required, - * otherwise work_queue_item_add ---- lib/workqueue.h 30 Mar 2006 14:25:24 -0000 1.8 -+++ lib/workqueue.h 12 Nov 2007 14:41:09 -0000 -@@ -47,11 +47,8 @@ struct work_queue_item - unsigned short ran; /* # of times item has been run */ - }; - --enum work_queue_flags --{ -- WQ_UNPLUGGED = 0, -- WQ_PLUGGED = 1, --}; -+#define WQ_UNPLUGGED (1 << 0) /* available for draining */ -+#define WQ_AIM_HEAD (1 << 1) /* add new items before list head, not after tail */ - - struct work_queue - { -@@ -101,7 +98,7 @@ struct work_queue - } cycles; /* cycle counts */ - - /* private state */ -- enum work_queue_flags flags; /* user set flag */ -+ u_int16_t flags; /* user set flag */ - }; - - /* User API */ -@@ -122,6 +119,8 @@ extern void work_queue_add (struct work_ - extern void work_queue_plug (struct work_queue *wq); - /* unplug the queue, allow it to be drained again */ - extern void work_queue_unplug (struct work_queue *wq); -+/* control the value for WQ_AIM_HEAD flag */ -+extern void work_queue_aim_head (struct work_queue *wq, const unsigned); - - /* Helpers, exported for thread.c and command.c */ - extern int work_queue_run (struct thread *); ---- zebra/connected.c 2 May 2007 16:05:35 -0000 1.28 -+++ zebra/connected.c 12 Nov 2007 14:41:10 -0000 -@@ -35,6 +35,7 @@ - #include "zebra/redistribute.h" - #include "zebra/interface.h" - #include "zebra/connected.h" -+extern struct zebra_t zebrad; - - /* withdraw a connected address */ - static void -@@ -187,8 +188,15 @@ connected_up_ipv4 (struct interface *ifp - if (prefix_ipv4_any (&p)) - return; - -+ /* Always push arriving/departing connected routes into the head of -+ * the working queue to make possible proper validation of the rest -+ * of the RIB queue (which will contain the whole RIB after the first -+ * call to rib_update()). -+ */ -+ work_queue_aim_head (zebrad.ribq, 1); - rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, NULL, ifp->ifindex, - RT_TABLE_MAIN, ifp->metric, 0); -+ work_queue_aim_head (zebrad.ribq, 0); - - rib_update (); - } -@@ -293,7 +301,10 @@ connected_down_ipv4 (struct interface *i - if (prefix_ipv4_any (&p)) - return; - -+ /* Same logic as for connected_up_ipv4(): push the changes into the head. */ -+ work_queue_aim_head (zebrad.ribq, 1); - rib_delete_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0); -+ work_queue_aim_head (zebrad.ribq, 0); - - rib_update (); - } -@@ -338,8 +349,10 @@ connected_up_ipv6 (struct interface *ifp - return; - #endif - -+ work_queue_aim_head (zebrad.ribq, 1); - rib_add_ipv6 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, - ifp->metric, 0); -+ work_queue_aim_head (zebrad.ribq, 0); - - rib_update (); - } -@@ -413,7 +426,9 @@ connected_down_ipv6 (struct interface *i - if (IN6_IS_ADDR_UNSPECIFIED (&p.prefix)) - return; - -+ work_queue_aim_head (zebrad.ribq, 1); - rib_delete_ipv6 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0); -+ work_queue_aim_head (zebrad.ribq, 0); - - rib_update (); - } diff --git a/net/quagga/files/patch-cvs-13-ifaddress b/net/quagga/files/patch-cvs-13-ifaddress deleted file mode 100644 index 54246515272c..000000000000 --- a/net/quagga/files/patch-cvs-13-ifaddress +++ /dev/null @@ -1,100 +0,0 @@ -Index: zebra/ioctl.c -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/ioctl.c,v -retrieving revision 1.14 -diff -u -r1.14 ioctl.c ---- zebra/ioctl.c 11 Jan 2008 15:57:13 -0000 1.14 -+++ zebra/ioctl.c 20 Feb 2008 15:56:23 -0000 -@@ -196,6 +196,7 @@ - struct prefix_ipv4 *p; - - p = (struct prefix_ipv4 *) ifc->address; -+ rib_lookup_and_pushup (p); - - memset (&addreq, 0, sizeof addreq); - strncpy ((char *)&addreq.ifra_name, ifp->name, sizeof addreq.ifra_name); -Index: zebra/rib.h -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/rib.h,v -retrieving revision 1.14 -diff -u -r1.14 rib.h ---- zebra/rib.h 13 Aug 2007 16:03:07 -0000 1.14 -+++ zebra/rib.h 20 Feb 2008 15:56:23 -0000 -@@ -212,6 +212,7 @@ - extern struct nexthop *nexthop_ipv4_add (struct rib *, struct in_addr *, - struct in_addr *); - extern void rib_lookup_and_dump (struct prefix_ipv4 *); -+extern void rib_lookup_and_pushup (struct prefix_ipv4 *); - extern void rib_dump (const char *, const struct prefix_ipv4 *, const struct rib *); - extern int rib_lookup_ipv4_route (struct prefix_ipv4 *, union sockunion *); - #define ZEBRA_RIB_LOOKUP_ERROR -1 -Index: zebra/zebra_rib.c -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/zebra_rib.c,v -retrieving revision 1.42 -diff -u -r1.42 zebra_rib.c ---- zebra/zebra_rib.c 8 Jan 2008 20:12:46 -0000 1.42 -+++ zebra/zebra_rib.c 20 Feb 2008 15:56:23 -0000 -@@ -1614,6 +1614,62 @@ - } - } - -+/* Check if requested address assignment will fail due to another -+ * non-CONNECTED route being installed in FIB already. Take necessary -+ * actions, if needed: remove such a route from FIB and deSELECT -+ * corresponding RIB entry. Then put affected RN into RIBQ head. -+ */ -+void rib_lookup_and_pushup (struct prefix_ipv4 * p) -+{ -+ struct route_table *table; -+ struct route_node *rn; -+ struct rib *rib; -+ unsigned changed = 0; -+ -+ if (NULL == (table = vrf_table (AFI_IP, SAFI_UNICAST, 0))) -+ { -+ zlog_err ("%s: vrf_table() returned NULL", __func__); -+ return; -+ } -+ -+ /* No matches would be the simplest case. */ -+ if (NULL == (rn = route_node_lookup (table, (struct prefix *) p))) -+ return; -+ -+ /* Unlock node. */ -+ route_unlock_node (rn); -+ -+ /* Check all RIB entries. In case any changes have to be done, requeue -+ * the RN into RIBQ head. If the routing message about the new connected -+ * route (generated by the IP address we are going to assign very soon) -+ * comes before the RIBQ is processed, the new RIB entry will join -+ * RIBQ record already on head. This is necessary for proper revalidation -+ * of the rest of the RIB. -+ */ -+ for (rib = rn->info; rib; rib = rib->next) -+ { -+ if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED) && -+ rib->type != ZEBRA_ROUTE_CONNECT) // Should we leave ZEBRA_ROUTE_KERNEL intact as well? -+ { -+ changed = 1; -+ if (IS_ZEBRA_DEBUG_RIB) -+ { -+ char buf[INET_ADDRSTRLEN]; -+ inet_ntop (rn->p.family, &p->prefix, buf, INET_ADDRSTRLEN); -+ zlog_debug ("%s: freeing way for connected prefix %s/%d", __func__, buf, p->prefixlen); -+ rib_dump (__func__, (struct prefix_ipv4 *)&rn->p, rib); -+ } -+ rib_uninstall (rn, rib); -+ } -+ } -+ if (changed) -+ { -+ work_queue_aim_head (zebrad.ribq, 1); -+ rib_queue_add (&zebrad, rn); -+ work_queue_aim_head (zebrad.ribq, 0); -+ } -+} -+ - int - rib_add_ipv4_multipath (struct prefix_ipv4 *p, struct rib *rib) - { diff --git a/net/quagga/files/patch-cvs-2-rtm_type_str b/net/quagga/files/patch-cvs-2-rtm_type_str deleted file mode 100644 index 4002ec8d1ad5..000000000000 --- a/net/quagga/files/patch-cvs-2-rtm_type_str +++ /dev/null @@ -1,108 +0,0 @@ ---- zebra/kernel_socket.c 21 Aug 2007 16:15:39 -0000 1.47 -+++ zebra/kernel_socket.c 14 Sep 2007 09:55:16 -0000 -@@ -160,7 +160,6 @@ - #endif /* RTM_IFANNOUNCE */ - {0, NULL} - }; --int rtm_type_str_max = sizeof (rtm_type_str) / sizeof (struct message) - 1; - - struct message rtm_flag_str[] = - { -@@ -754,7 +753,7 @@ - return; - if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug ("%s: got rtm of type %d (%s)", __func__, rtm->rtm_type, -- LOOKUP (rtm_type_str, rtm->rtm_type)); -+ lookup (rtm_type_str, rtm->rtm_type)); - - #ifdef RTF_CLONED /*bsdi, netbsd 1.6*/ - if (flags & RTF_CLONED) -@@ -820,17 +819,17 @@ - { - case ZEBRA_RIB_NOTFOUND: - zlog_debug ("%s: %s %s/%d: desync: RR isn't yet in RIB, while already in FIB", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); - break; - case ZEBRA_RIB_FOUND_CONNECTED: - case ZEBRA_RIB_FOUND_NOGATE: - inet_ntop (AF_INET, &gate.sin.sin_addr, gate_buf, INET_ADDRSTRLEN); - zlog_debug ("%s: %s %s/%d: desync: RR is in RIB, but gate differs (ours is %s)", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen, gate_buf); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen, gate_buf); - break; - case ZEBRA_RIB_FOUND_EXACT: /* RIB RR == FIB RR */ - zlog_debug ("%s: %s %s/%d: done Ok", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); - rib_lookup_and_dump (&p); - return; - break; -@@ -843,18 +842,18 @@ - { - case ZEBRA_RIB_FOUND_EXACT: - zlog_debug ("%s: %s %s/%d: desync: RR is still in RIB, while already not in FIB", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); - rib_lookup_and_dump (&p); - break; - case ZEBRA_RIB_FOUND_CONNECTED: - case ZEBRA_RIB_FOUND_NOGATE: - zlog_debug ("%s: %s %s/%d: desync: RR is still in RIB, plus gate differs", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); - rib_lookup_and_dump (&p); - break; - case ZEBRA_RIB_NOTFOUND: /* RIB RR == FIB RR */ - zlog_debug ("%s: %s %s/%d: done Ok", -- __func__, LOOKUP (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); -+ __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen); - rib_lookup_and_dump (&p); - return; - break; -@@ -862,7 +861,7 @@ - break; - default: - zlog_debug ("%s: %s/%d: warning: loopback RTM of type %s received", -- __func__, buf, p.prefixlen, LOOKUP (rtm_type_str, rtm->rtm_type)); -+ __func__, buf, p.prefixlen, lookup (rtm_type_str, rtm->rtm_type)); - } - return; - } -@@ -1063,7 +1062,7 @@ - static void - rtmsg_debug (struct rt_msghdr *rtm) - { -- zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, LOOKUP (rtm_type_str, rtm->rtm_type)); -+ zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, lookup (rtm_type_str, rtm->rtm_type)); - rtm_flag_dump (rtm->rtm_flags); - zlog_debug ("Kernel: message seq %d", rtm->rtm_seq); - zlog_debug ("Kernel: pid %d, rtm_addrs 0x%x", rtm->rtm_pid, rtm->rtm_addrs); ---- zebra/kernel_socket.h 13 Aug 2007 16:03:07 -0000 1.2 -+++ zebra/kernel_socket.h 14 Sep 2007 09:55:16 -0000 -@@ -29,6 +29,5 @@ - extern int rtm_write (int, union sockunion *, union sockunion *, - union sockunion *, unsigned int, int, int); - extern struct message rtm_type_str[]; --extern int rtm_type_str_max; - - #endif /* __ZEBRA_KERNEL_SOCKET_H */ ---- zebra/rt_socket.c 12 Sep 2007 15:24:27 -0000 1.14 -+++ zebra/rt_socket.c 14 Sep 2007 09:55:16 -0000 -@@ -211,14 +211,14 @@ - if (!IS_ZEBRA_DEBUG_RIB) - inet_ntop (AF_INET, &p->u.prefix, prefix_buf, INET_ADDRSTRLEN); - zlog_err ("%s: %s/%d: rtm_write() unexpectedly returned %d for command %s", -- __func__, prefix_buf, p->prefixlen, error, LOOKUP (rtm_type_str, cmd)); -+ __func__, prefix_buf, p->prefixlen, error, lookup (rtm_type_str, cmd)); - break; - } - } /* if (cmd and flags make sense) */ - else - if (IS_ZEBRA_DEBUG_RIB) - zlog_debug ("%s: odd command %s for flags %d", -- __func__, LOOKUP (rtm_type_str, cmd), nexthop->flags); -+ __func__, lookup (rtm_type_str, cmd), nexthop->flags); - } /* for (nexthop = ... */ - - /* If there was no useful nexthop, then complain. */ diff --git a/net/quagga/files/patch-cvs-3-rib_sweep_route b/net/quagga/files/patch-cvs-3-rib_sweep_route deleted file mode 100644 index 7d0b77af07a4..000000000000 --- a/net/quagga/files/patch-cvs-3-rib_sweep_route +++ /dev/null @@ -1,39 +0,0 @@ ---- zebra/main.c 2007-05-02 19:28:33.000000000 +0400 -+++ zebra/main.c 2007-09-14 17:34:12.000000000 +0400 -@@ -346,11 +346,13 @@ - zebra_snmp_init (); - #endif /* HAVE_SNMP */ - -- /* Clean up self inserted route. */ -- if (! keep_kernel_mode) -- rib_sweep_route (); -- -- /* Configuration file read*/ -+ /* Process the configuration file. Among other configuration -+ * directives we can meet those installing static routes. Such -+ * requests will not be executed immediately, but queued in -+ * zebra->ribq structure until we enter the main execution loop. -+ * The notifications from kernel will show originating PID equal -+ * to that after daemon() completes (if ever called). -+ */ - vty_read_config (config_file, config_default); - - /* Don't start execution if we are in dry-run mode */ -@@ -374,6 +376,17 @@ - /* Output pid of zebra. */ - pid_output (pid_file); - -+ /* After we have successfully acquired the pidfile, we can be sure -+ * about being the only copy of zebra process, which is submitting -+ * changes to the FIB. -+ * Clean up zebra-originated routes. The requests will be sent to OS -+ * immediately, so originating PID in notifications from kernel -+ * will be equal to the current getpid(). To know about such routes, -+ * we have to have route_read() called before. -+ */ -+ if (! keep_kernel_mode) -+ rib_sweep_route (); -+ - /* Needed for BSD routing socket. */ - pid = getpid (); - diff --git a/net/quagga/files/patch-cvs-4-old_pid b/net/quagga/files/patch-cvs-4-old_pid deleted file mode 100644 index 069e879024c4..000000000000 --- a/net/quagga/files/patch-cvs-4-old_pid +++ /dev/null @@ -1,81 +0,0 @@ -Index: zebra/kernel_socket.c -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/kernel_socket.c,v -retrieving revision 1.48 -diff -u -r1.48 kernel_socket.c ---- zebra/kernel_socket.c 14 Sep 2007 11:31:55 -0000 1.48 -+++ zebra/kernel_socket.c 14 Sep 2007 14:11:28 -0000 -@@ -799,8 +799,7 @@ - * At the same time, ignore unconfirmed messages, they should be tracked - * by rtm_write() and kernel_rtm_ipv4(). - */ -- if (rtm->rtm_type != RTM_GET -- && (rtm->rtm_pid == pid || rtm->rtm_pid == old_pid)) -+ if (rtm->rtm_type != RTM_GET && rtm->rtm_pid == pid) - { - char buf[INET_ADDRSTRLEN], gate_buf[INET_ADDRSTRLEN]; - int ret; -Index: zebra/main.c -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/main.c,v -retrieving revision 1.27 -diff -u -r1.27 main.c ---- zebra/main.c 14 Sep 2007 13:31:52 -0000 1.27 -+++ zebra/main.c 14 Sep 2007 14:11:28 -0000 -@@ -47,7 +47,6 @@ - }; - - /* process id. */ --pid_t old_pid; - pid_t pid; - - /* Pacify zclient.o in libzebra, which expects this variable. */ -@@ -366,9 +365,6 @@ - if (batch_mode) - exit (0); - -- /* Needed for BSD routing socket. */ -- old_pid = getpid (); -- - /* Daemonize. */ - if (daemon_mode) - daemon (0, 0); -Index: zebra/test_main.c -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/test_main.c,v -retrieving revision 1.1 -diff -u -r1.1 test_main.c ---- zebra/test_main.c 27 Jul 2006 19:59:58 -0000 1.1 -+++ zebra/test_main.c 14 Sep 2007 14:11:28 -0000 -@@ -43,7 +43,6 @@ - }; - - /* process id. */ --pid_t old_pid; - pid_t pid; - - /* zebra_rib's workqueue hold time. Private export for use by test code only */ -@@ -313,9 +312,6 @@ - if (batch_mode) - exit (0); - -- /* Needed for BSD routing socket. */ -- old_pid = getpid (); -- - /* Daemonize. */ - if (daemon_mode) - daemon (0, 0); -Index: zebra/zserv.h -=================================================================== -RCS file: /var/cvsroot/quagga/zebra/zserv.h,v -retrieving revision 1.15 -diff -u -r1.15 zserv.h ---- zebra/zserv.h 2 May 2007 16:05:35 -0000 1.15 -+++ zebra/zserv.h 14 Sep 2007 14:11:28 -0000 -@@ -107,6 +107,5 @@ - extern int zsend_router_id_update(struct zserv *, struct prefix *); - - extern pid_t pid; --extern pid_t old_pid; - - #endif /* _ZEBRA_ZEBRA_H */ diff --git a/net/quagga/files/patch-cvs-5-sndbuf b/net/quagga/files/patch-cvs-5-sndbuf deleted file mode 100644 index 299f1dc1aa66..000000000000 --- a/net/quagga/files/patch-cvs-5-sndbuf +++ /dev/null @@ -1,20 +0,0 @@ ---- ospfd/ospfd.c 21 Aug 2007 16:32:57 -0000 1.51 -+++ ospfd/ospfd.c 17 Sep 2007 16:45:40 -0000 -@@ -33,6 +33,7 @@ - #include "sockunion.h" /* for inet_aton () */ - #include "zclient.h" - #include "plist.h" -+#include "sockopt.h" - - #include "ospfd/ospfd.h" - #include "ospfd/ospf_network.h" -@@ -212,8 +213,7 @@ - "a socket"); - exit(1); - } -- new->maxsndbuflen = 0; -- ospf_adjust_sndbuflen (new, OSPF_SNDBUFLEN_DEFAULT); -+ new->maxsndbuflen = getsockopt_so_sendbuf (new->fd); - if ((new->ibuf = stream_new(OSPF_MAX_PACKET_SIZE+1)) == NULL) - { - zlog_err("ospf_new: fatal error: stream_new(%u) failed allocating ibuf", diff --git a/net/quagga/files/patch-cvs-6-pidfile_mask b/net/quagga/files/patch-cvs-6-pidfile_mask deleted file mode 100644 index 399f06a0eac3..000000000000 --- a/net/quagga/files/patch-cvs-6-pidfile_mask +++ /dev/null @@ -1,30 +0,0 @@ ---- lib/pid_output.c 17 Dec 2004 20:50:00 -0000 1.9 -+++ lib/pid_output.c 4 Oct 2007 15:07:57 -0000 -@@ -25,6 +25,7 @@ - #include <log.h> - #include "version.h" - -+#define PIDFILE_MASK 0644 - #ifndef HAVE_FCNTL - - pid_t -@@ -36,7 +37,7 @@ pid_output (const char *path) - - pid = getpid(); - -- oldumask = umask(0777 & ~LOGFILE_MASK); -+ oldumask = umask(0777 & ~PIDFILE_MASK); - fp = fopen (path, "w"); - if (fp != NULL) - { -@@ -67,8 +68,8 @@ pid_output (const char *path) - - pid = getpid (); - -- oldumask = umask(0777 & ~LOGFILE_MASK); -- fd = open (path, O_RDWR | O_CREAT, LOGFILE_MASK); -+ oldumask = umask(0777 & ~PIDFILE_MASK); -+ fd = open (path, O_RDWR | O_CREAT, PIDFILE_MASK); - if (fd < 0) - { - zlog_err("Can't create pid lock file %s (%s), exiting", diff --git a/net/quagga/files/patch-cvs-7-inet6debug b/net/quagga/files/patch-cvs-7-inet6debug deleted file mode 100644 index f432d399ea7f..000000000000 --- a/net/quagga/files/patch-cvs-7-inet6debug +++ /dev/null @@ -1,74 +0,0 @@ -diff -Nur zebra/zebra_rib.c zebra/zebra_rib.c ---- zebra/zebra_rib.c 2007-08-22 20:22:57 +0400 -+++ zebra/zebra_rib.c 2007-10-03 16:12:12 +0400 -@@ -992,12 +992,12 @@ - struct route_node *rn = data; - int installed = 0; - struct nexthop *nexthop = NULL; -- char buf[INET_ADDRSTRLEN]; -+ char buf[INET6_ADDRSTRLEN]; - - assert (rn); - - if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_Q) -- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN); -+ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); - - for (rib = rn->info; rib; rib = next) - { -@@ -1300,7 +1300,7 @@ - rib_link (struct route_node *rn, struct rib *rib) - { - struct rib *head; -- char buf[INET_ADDRSTRLEN]; -+ char buf[INET6_ADDRSTRLEN]; - - assert (rib && rn); - -@@ -1308,7 +1308,7 @@ - - if (IS_ZEBRA_DEBUG_RIB) - { -- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN); -+ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); - zlog_debug ("%s: %s/%d: rn %p, rib %p", __func__, - buf, rn->p.prefixlen, rn, rib); - } -@@ -1338,8 +1338,8 @@ - { - if (IS_ZEBRA_DEBUG_RIB) - { -- char buf[INET_ADDRSTRLEN]; -- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN); -+ char buf[INET6_ADDRSTRLEN]; -+ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); - zlog_debug ("%s: %s/%d: rn %p, un-removed rib %p", - __func__, buf, rn->p.prefixlen, rn, rib); - } -@@ -1353,13 +1353,13 @@ - rib_unlink (struct route_node *rn, struct rib *rib) - { - struct nexthop *nexthop, *next; -- char buf[INET_ADDRSTRLEN]; -+ char buf[INET6_ADDRSTRLEN]; - - assert (rn && rib); - - if (IS_ZEBRA_DEBUG_RIB) - { -- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN); -+ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); - zlog_debug ("%s: %s/%d: rn %p, rib %p", - __func__, buf, rn->p.prefixlen, rn, rib); - } -@@ -1398,8 +1398,8 @@ - { - if (IS_ZEBRA_DEBUG_RIB) - { -- char buf[INET_ADDRSTRLEN]; -- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN); -+ char buf[INET6_ADDRSTRLEN]; -+ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); - zlog_debug ("%s: %s/%d: rn %p, rib %p, removing", __func__, - buf, rn->p.prefixlen, rn, rib); - } diff --git a/net/quagga/files/patch-cvs-9-ipv6ignore b/net/quagga/files/patch-cvs-9-ipv6ignore deleted file mode 100644 index 94f2f4e34055..000000000000 --- a/net/quagga/files/patch-cvs-9-ipv6ignore +++ /dev/null @@ -1,14 +0,0 @@ ---- zebra/kernel_socket.c 14 Sep 2007 14:56:28 -0000 1.49 -+++ zebra/kernel_socket.c 24 Oct 2007 09:44:17 -0000 -@@ -884,6 +884,11 @@ rtm_read (struct rt_msghdr *rtm) - #ifdef HAVE_IPV6 - if (dest.sa.sa_family == AF_INET6) - { -+ /* One day we might have a debug section here like one in the -+ * IPv4 case above. Just ignore own messages at the moment. -+ */ -+ if (rtm->rtm_type != RTM_GET && rtm->rtm_pid == pid) -+ return; - struct prefix_ipv6 p; - unsigned int ifindex = 0; - diff --git a/net/quagga/files/quagga.sh.in b/net/quagga/files/quagga.sh.in index 9f00a2f22453..62bfece8272e 100644 --- a/net/quagga/files/quagga.sh.in +++ b/net/quagga/files/quagga.sh.in @@ -80,6 +80,7 @@ for daemon in ${quagga_daemons}; do continue fi eval flags=\$\{${daemon}_flags:-\"${quagga_flags}\"\} + name="${daemon}" run_rc_command "$1" _rc_restart_done=false done |