aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-08-27 08:30:38 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-08-27 08:33:44 +0300
commit3cc3cc2a0c120341060d6098c1d320e18df49474 (patch)
treed6b7e946d61162ac304dc74fc6be6fe03152771a /main/quagga
parent292070ca1e8abc925d46bb9396b320bfb02384b9 (diff)
downloadaports-3cc3cc2a0c120341060d6098c1d320e18df49474.tar.bz2
aports-3cc3cc2a0c120341060d6098c1d320e18df49474.tar.xz
main/quagga: upgrade to 0.99.23.1
remove upstreamed patches, autoreconf no longer needed. 'next-hop-self all' patch refreshed to the upstream master git commit.
Diffstat (limited to 'main/quagga')
-rw-r--r--main/quagga/0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch70
-rw-r--r--main/quagga/0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch119
-rw-r--r--main/quagga/0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch58
-rw-r--r--main/quagga/0004-bgpd-fix-memory-leak-on-malformed-attribute.patch33
-rw-r--r--main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch28
-rw-r--r--main/quagga/0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch155
-rw-r--r--main/quagga/1001-bgpd-implement-next-hop-self-all.patch55
-rw-r--r--main/quagga/APKBUILD56
-rw-r--r--main/quagga/musl-fix-headers.patch22
-rw-r--r--main/quagga/musl-fix-msghdr-usage.patch42
-rw-r--r--main/quagga/musl-linux-ipv6.patch22
11 files changed, 44 insertions, 616 deletions
diff --git a/main/quagga/0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch b/main/quagga/0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
deleted file mode 100644
index 4269a880a2..0000000000
--- a/main/quagga/0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From c460e5720c1101a6da53e5b753b736ac2c7981af Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 00:54:58 +0200
-Subject: [PATCH] bgpd: fix some bgp_update_main() attribute leaks
-
-bgp_update_main() wasn't doing anything to release attribute values
-set from route maps for two of its error paths. To fix, pull up the
-appropriate cleanup from further down and apply it here.
-
-bgp_update_rsclient() doesn't have the issue since it immediately
-does bgp_attr_intern() on the results from bgp_{export,import}_modifier.
-
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_route.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
-index f421ca5..ed8464d 100644
---- a/bgpd/bgp_route.c
-+++ b/bgpd/bgp_route.c
-@@ -713,11 +713,8 @@ bgp_input_modifier (struct peer *peer, struct prefix *p, struct attr *attr,
- peer->rmap_type = 0;
-
- if (ret == RMAP_DENYMATCH)
-- {
-- /* Free newly generated AS path and community by route-map. */
-- bgp_attr_flush (attr);
-- return RMAP_DENY;
-- }
-+ /* caller has multiple error paths with bgp_attr_flush() */
-+ return RMAP_DENY;
- }
- return RMAP_PERMIT;
- }
-@@ -2143,10 +2140,14 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
- new_attr.extra = &new_extra;
- bgp_attr_dup (&new_attr, attr);
-
-- /* Apply incoming route-map. */
-+ /* Apply incoming route-map.
-+ * NB: new_attr may now contain newly allocated values from route-map "set"
-+ * commands, so we need bgp_attr_flush in the error paths, until we intern
-+ * the attr (which takes over the memory references) */
- if (bgp_input_modifier (peer, p, &new_attr, afi, safi) == RMAP_DENY)
- {
- reason = "route-map;";
-+ bgp_attr_flush (&new_attr);
- goto filtered;
- }
-
-@@ -2160,6 +2161,7 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
- && ! CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
- {
- reason = "non-connected next-hop;";
-+ bgp_attr_flush (&new_attr);
- goto filtered;
- }
-
-@@ -2170,6 +2172,7 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
- || bgp_nexthop_self (&new_attr))
- {
- reason = "martian next-hop;";
-+ bgp_attr_flush (&new_attr);
- goto filtered;
- }
- }
---
-2.0.1
-
diff --git a/main/quagga/0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch b/main/quagga/0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
deleted file mode 100644
index 81a38d60da..0000000000
--- a/main/quagga/0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 73d78ea0153fd36a300be5fec2ef0fca34a67477 Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 00:58:47 +0200
-Subject: [PATCH] bgpd: remove duplicate route-map extcommunity code
-
-route_set_ecommunity_rt and _soo share almost all of their code.
-Let's remove one of the redundant copies.
-
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_routemap.c | 59 ++++++++---------------------------------------------
- 1 file changed, 9 insertions(+), 50 deletions(-)
-
-diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
-index 6dc88b3..eb5e80f 100644
---- a/bgpd/bgp_routemap.c
-+++ b/bgpd/bgp_routemap.c
-@@ -1530,10 +1530,10 @@ struct route_map_rule_cmd route_set_community_delete_cmd =
-
- /* `set extcommunity rt COMMUNITY' */
-
--/* For community set mechanism. */
-+/* For community set mechanism. Used by _rt and _soo. */
- static route_map_result_t
--route_set_ecommunity_rt (void *rule, struct prefix *prefix,
-- route_map_object_t type, void *object)
-+route_set_ecommunity (void *rule, struct prefix *prefix,
-+ route_map_object_t type, void *object)
- {
- struct ecommunity *ecom;
- struct ecommunity *new_ecom;
-@@ -1578,9 +1578,9 @@ route_set_ecommunity_rt_compile (const char *arg)
- return ecommunity_intern (ecom);
- }
-
--/* Free function for set community. */
-+/* Free function for set community. Used by _rt and _soo */
- static void
--route_set_ecommunity_rt_free (void *rule)
-+route_set_ecommunity_free (void *rule)
- {
- struct ecommunity *ecom = rule;
- ecommunity_unintern (&ecom);
-@@ -1590,46 +1590,13 @@ route_set_ecommunity_rt_free (void *rule)
- struct route_map_rule_cmd route_set_ecommunity_rt_cmd =
- {
- "extcommunity rt",
-- route_set_ecommunity_rt,
-+ route_set_ecommunity,
- route_set_ecommunity_rt_compile,
-- route_set_ecommunity_rt_free,
-+ route_set_ecommunity_free,
- };
-
- /* `set extcommunity soo COMMUNITY' */
-
--/* For community set mechanism. */
--static route_map_result_t
--route_set_ecommunity_soo (void *rule, struct prefix *prefix,
-- route_map_object_t type, void *object)
--{
-- struct ecommunity *ecom, *old_ecom, *new_ecom;
-- struct bgp_info *bgp_info;
--
-- if (type == RMAP_BGP)
-- {
-- ecom = rule;
-- bgp_info = object;
--
-- if (! ecom)
-- return RMAP_OKAY;
--
-- old_ecom = (bgp_attr_extra_get (bgp_info->attr))->ecommunity;
--
-- if (old_ecom)
-- new_ecom = ecommunity_merge (ecommunity_dup (old_ecom), ecom);
-- else
-- new_ecom = ecommunity_dup (ecom);
--
-- bgp_info->attr->extra->ecommunity = ecommunity_intern (new_ecom);
--
-- if (old_ecom)
-- ecommunity_unintern (&old_ecom);
--
-- bgp_info->attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_EXT_COMMUNITIES);
-- }
-- return RMAP_OKAY;
--}
--
- /* Compile function for set community. */
- static void *
- route_set_ecommunity_soo_compile (const char *arg)
-@@ -1643,21 +1610,13 @@ route_set_ecommunity_soo_compile (const char *arg)
- return ecommunity_intern (ecom);
- }
-
--/* Free function for set community. */
--static void
--route_set_ecommunity_soo_free (void *rule)
--{
-- struct ecommunity *ecom = rule;
-- ecommunity_unintern (&ecom);
--}
--
- /* Set community rule structure. */
- struct route_map_rule_cmd route_set_ecommunity_soo_cmd =
- {
- "extcommunity soo",
-- route_set_ecommunity_soo,
-+ route_set_ecommunity,
- route_set_ecommunity_soo_compile,
-- route_set_ecommunity_soo_free,
-+ route_set_ecommunity_free,
- };
-
- /* `set origin ORIGIN' */
---
-2.0.1
-
diff --git a/main/quagga/0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch b/main/quagga/0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
deleted file mode 100644
index fbd226822f..0000000000
--- a/main/quagga/0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 27bf90a14670283a899b96c56dd23f8413e0973e Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 00:59:01 +0200
-Subject: [PATCH] bgpd: fix double free after extcommunity set (BZ#799)
-
-The route-map extcommunity set code was incorrectly assuming that it
-owns the intern'd struct ecommunity reference. In reality, the intern'd
-reference belongs to bgp_update_receive() and we're not supposed to
-touch it in the route-map code.
-
-Instead, like all the other set commands, we use a on-heap but
-non-intern'd ecommunity to set the new value. This is then either
-intern'd in bgp_update_main/_rsclient() through bgp_attr_intern(), or
-free'd through bgp_attr_flush().
-
-This fixes Bugzilla #799, which is that bgpd otherwise crashes with a
-double free. The ecommunity got unintern'd first in the route-map set
-command, then in bgp_update_receive().
-
-Debugged-by: Milan Kocian <milon@wq.cz>
-Reported-by: Florian S <florian@herrenlohe.de>
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_routemap.c | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
-index eb5e80f..36d177d 100644
---- a/bgpd/bgp_routemap.c
-+++ b/bgpd/bgp_routemap.c
-@@ -1552,14 +1552,19 @@ route_set_ecommunity (void *rule, struct prefix *prefix,
- old_ecom = (bgp_attr_extra_get (bgp_info->attr))->ecommunity;
-
- if (old_ecom)
-- new_ecom = ecommunity_merge (ecommunity_dup (old_ecom), ecom);
-+ {
-+ new_ecom = ecommunity_merge (ecommunity_dup (old_ecom), ecom);
-+
-+ /* old_ecom->refcnt = 1 => owned elsewhere, e.g. bgp_update_receive()
-+ * ->refcnt = 0 => set by a previous route-map statement */
-+ if (!old_ecom->refcnt)
-+ ecommunity_free (&old_ecom);
-+ }
- else
- new_ecom = ecommunity_dup (ecom);
-
-- bgp_info->attr->extra->ecommunity = ecommunity_intern (new_ecom);
--
-- if (old_ecom)
-- ecommunity_unintern (&old_ecom);
-+ /* will be intern()'d or attr_flush()'d by bgp_update_main() */
-+ bgp_info->attr->extra->ecommunity = new_ecom;
-
- bgp_info->attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_EXT_COMMUNITIES);
- }
---
-2.0.1
-
diff --git a/main/quagga/0004-bgpd-fix-memory-leak-on-malformed-attribute.patch b/main/quagga/0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
deleted file mode 100644
index 2288d9fbef..0000000000
--- a/main/quagga/0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f80f838b2f54738937ef1281b237710132195c44 Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 01:00:51 +0200
-Subject: [PATCH] bgpd: fix memory leak on malformed attribute
-
-When bgp_attr_parse returns BGP_ATTR_PARSE_ERROR, it may already have
-parsed and allocated some attributes before hitting that error. Free
-the attr's data before returning.
-
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_packet.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
-index 80651f1..65c6cac 100644
---- a/bgpd/bgp_packet.c
-+++ b/bgpd/bgp_packet.c
-@@ -1720,7 +1720,10 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
- attr_parse_ret = bgp_attr_parse (peer, &attr, attribute_len,
- &mp_update, &mp_withdraw);
- if (attr_parse_ret == BGP_ATTR_PARSE_ERROR)
-- return -1;
-+ {
-+ bgp_attr_unintern_sub (&attr);
-+ return -1;
-+ }
- }
-
- /* Logging the attribute. */
---
-2.0.1
-
diff --git a/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch b/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
deleted file mode 100644
index edbe60e6fb..0000000000
--- a/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From bb02b82354a80f74706efc5e4c914b3f89fb033e Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 01:01:00 +0200
-Subject: [PATCH] bgpd: fix IP endianness in debug message
-
-inet_ntop expects network byte order.
-
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_attr.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
-index a1fd165..f9fde9f 100644
---- a/bgpd/bgp_attr.c
-+++ b/bgpd/bgp_attr.c
-@@ -1110,7 +1110,7 @@ bgp_attr_nexthop (struct bgp_attr_parser_args *args)
- if (IPV4_NET0 (nexthop_h) || IPV4_NET127 (nexthop_h) || IPV4_CLASS_DE (nexthop_h))
- {
- char buf[INET_ADDRSTRLEN];
-- inet_ntop (AF_INET, &nexthop_h, buf, INET_ADDRSTRLEN);
-+ inet_ntop (AF_INET, &nexthop_n, buf, INET_ADDRSTRLEN);
- zlog (peer->log, LOG_ERR, "Martian nexthop %s", buf);
- return bgp_attr_malformed (args,
- BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP,
---
-2.0.1
-
diff --git a/main/quagga/0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch b/main/quagga/0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
deleted file mode 100644
index 85a24e4fe2..0000000000
--- a/main/quagga/0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From f57000c0dbdd0e30e71b6651022392f284201e19 Mon Sep 17 00:00:00 2001
-From: David Lamparter <equinox@opensourcerouting.org>
-Date: Wed, 4 Jun 2014 01:01:10 +0200
-Subject: [PATCH] bgpd: don't send NOTIFY twice for malformed attrs
-
-Most of the attribute parsing functions were already sending a notify,
-let's clean up the code to make it happen only once.
-
-Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
----
- bgpd/bgp_attr.c | 34 ++++++++++++++++++++++------------
- bgpd/bgp_attr.h | 3 +++
- 2 files changed, 25 insertions(+), 12 deletions(-)
-
-diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
-index f9fde9f..fcf8255 100644
---- a/bgpd/bgp_attr.c
-+++ b/bgpd/bgp_attr.c
-@@ -794,7 +794,7 @@ bgp_attr_malformed (struct bgp_attr_parser_args *args, u_char subcode,
- return BGP_ATTR_PARSE_WITHDRAW;
-
- /* default to reset */
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- /* Find out what is wrong with the path attribute flag bits and log the error.
-@@ -1483,7 +1483,7 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
- {
- zlog_info ("%s: %s sent invalid length, %lu",
- __func__, peer->host, (unsigned long)length);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- /* Load AFI, SAFI. */
-@@ -1497,7 +1497,7 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
- {
- zlog_info ("%s: %s, MP nexthop length, %u, goes past end of attribute",
- __func__, peer->host, attre->mp_nexthop_len);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- /* Nexthop length check. */
-@@ -1540,14 +1540,14 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
- default:
- zlog_info ("%s: (%s) Wrong multiprotocol next hop length: %d",
- __func__, peer->host, attre->mp_nexthop_len);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- if (!LEN_LEFT)
- {
- zlog_info ("%s: (%s) Failed to read SNPA and NLRI(s)",
- __func__, peer->host);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- {
-@@ -1563,7 +1563,7 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
- {
- zlog_info ("%s: (%s) Failed to read NLRI",
- __func__, peer->host);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- if (safi != SAFI_MPLS_LABELED_VPN)
-@@ -1573,7 +1573,7 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
- {
- zlog_info ("%s: (%s) NLRI doesn't pass sanity check",
- __func__, peer->host);
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
- }
-
-@@ -1605,7 +1605,7 @@ bgp_mp_unreach_parse (struct bgp_attr_parser_args *args,
-
- #define BGP_MP_UNREACH_MIN_SIZE 3
- if ((length > STREAM_READABLE(s)) || (length < BGP_MP_UNREACH_MIN_SIZE))
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
-
- afi = stream_getw (s);
- safi = stream_getc (s);
-@@ -1616,7 +1616,7 @@ bgp_mp_unreach_parse (struct bgp_attr_parser_args *args,
- {
- ret = bgp_nlri_sanity_check (peer, afi, stream_pnt (s), withdraw_len);
- if (ret < 0)
-- return BGP_ATTR_PARSE_ERROR;
-+ return BGP_ATTR_PARSE_ERROR_NOTIFYPLS;
- }
-
- mp_withdraw->afi = afi;
-@@ -1913,6 +1913,14 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
- break;
- }
-
-+ if (ret == BGP_ATTR_PARSE_ERROR_NOTIFYPLS)
-+ {
-+ bgp_notify_send (peer,
-+ BGP_NOTIFY_UPDATE_ERR,
-+ BGP_NOTIFY_UPDATE_MAL_ATTR);
-+ ret = BGP_ATTR_PARSE_ERROR;
-+ }
-+
- /* If hard error occured immediately return to the caller. */
- if (ret == BGP_ATTR_PARSE_ERROR)
- {
-@@ -1920,9 +1928,6 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
- "%s: Attribute %s, parse error",
- peer->host,
- LOOKUP (attr_str, type));
-- bgp_notify_send (peer,
-- BGP_NOTIFY_UPDATE_ERR,
-- BGP_NOTIFY_UPDATE_MAL_ATTR);
- if (as4_path)
- aspath_unintern (&as4_path);
- return ret;
-@@ -1979,9 +1984,14 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
- * all attributes first, including these 32bit ones, and now,
- * afterwards, we look what and if something is to be done for as4.
- */
-+ /* actually... this doesn't ever return failure currently, but
-+ * better safe than sorry */
- if (bgp_attr_munge_as4_attrs (peer, attr, as4_path,
- as4_aggregator, &as4_aggregator_addr))
- {
-+ bgp_notify_send (peer,
-+ BGP_NOTIFY_UPDATE_ERR,
-+ BGP_NOTIFY_UPDATE_MAL_ATTR);
- if (as4_path)
- aspath_unintern (&as4_path);
- return BGP_ATTR_PARSE_ERROR;
-diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
-index cdd5467..cb401e7 100644
---- a/bgpd/bgp_attr.h
-+++ b/bgpd/bgp_attr.h
-@@ -136,6 +136,9 @@ typedef enum {
- BGP_ATTR_PARSE_PROCEED = 0,
- BGP_ATTR_PARSE_ERROR = -1,
- BGP_ATTR_PARSE_WITHDRAW = -2,
-+
-+ /* only used internally, send notify + convert to BGP_ATTR_PARSE_ERROR */
-+ BGP_ATTR_PARSE_ERROR_NOTIFYPLS = -3,
- } bgp_attr_parse_ret_t;
-
- /* Prototypes. */
---
-2.0.1
-
diff --git a/main/quagga/1001-bgpd-implement-next-hop-self-all.patch b/main/quagga/1001-bgpd-implement-next-hop-self-all.patch
index d8efde4980..dd5e3e1aa1 100644
--- a/main/quagga/1001-bgpd-implement-next-hop-self-all.patch
+++ b/main/quagga/1001-bgpd-implement-next-hop-self-all.patch
@@ -1,7 +1,7 @@
-From a672a1b8cacc0353d08770763461bc2a38cfa2cc Mon Sep 17 00:00:00 2001
+From 9e7a53c179f6897128b24435452b5d3d0f8c715a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 24 Apr 2014 10:22:37 +0300
-Subject: [PATCH v2] bgpd: implement "next-hop-self all"
+Subject: [PATCH] bgpd: implement "next-hop-self all"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -17,23 +17,18 @@ http://blog.ipspace.net/2014/04/changes-in-ibgp-next-hop-processing.html
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
---
-Update to work have similar semantics as Cisco. The 'no' prefixed forms all cancel
-any active next-hop-self. And the regular form can be updated to change the form
-that is active.
-
-Also some stylistic improvements done.
-
bgpd/bgp_route.c | 3 ++-
bgpd/bgp_vty.c | 30 +++++++++++++++++++++++-------
bgpd/bgpd.c | 5 ++++-
bgpd/bgpd.h | 1 +
- 4 files changed, 30 insertions(+), 9 deletions(-)
+ doc/bgpd.texi | 8 +++++---
+ 5 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
-index 335543e..e0ecd36 100644
+index f421ca5..232a6a1 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
-@@ -962,7 +962,8 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p,
+@@ -976,7 +976,8 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p,
}
/* next-hop-set */
@@ -44,10 +39,10 @@ index 335543e..e0ecd36 100644
&& ((p->family == AF_INET && attr->nexthop.s_addr)
#ifdef HAVE_IPV6
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
-index 0f28894..fcbe8e4 100644
+index 3c6973b..a818fe7 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
-@@ -2061,25 +2061,41 @@ DEFUN (no_neighbor_capability_orf_prefix,
+@@ -2093,25 +2093,41 @@ DEFUN (no_neighbor_capability_orf_prefix,
/* neighbor next-hop-self. */
DEFUN (neighbor_nexthop_self,
neighbor_nexthop_self_cmd,
@@ -94,13 +89,13 @@ index 0f28894..fcbe8e4 100644
+ bgp_node_safi (vty),
+ PEER_FLAG_NEXTHOP_SELF|PEER_FLAG_NEXTHOP_SELF_ALL);
}
-
+
/* neighbor remove-private-AS. */
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
-index c9a04ff..fbc40df 100644
+index 19b96fa..4d374cc 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
-@@ -2331,6 +2331,7 @@ static const struct peer_flag_action peer_af_flag_action_list[] =
+@@ -2355,6 +2355,7 @@ static const struct peer_flag_action peer_af_flag_action_list[] =
{ PEER_FLAG_ORF_PREFIX_SM, 1, peer_change_reset },
{ PEER_FLAG_ORF_PREFIX_RM, 1, peer_change_reset },
{ PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED, 0, peer_change_reset_out },
@@ -108,7 +103,7 @@ index c9a04ff..fbc40df 100644
{ 0, 0, 0 }
};
-@@ -4965,7 +4966,9 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp,
+@@ -4990,7 +4991,9 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp,
/* Nexthop self. */
if (peer_af_flag_check (peer, afi, safi, PEER_FLAG_NEXTHOP_SELF)
&& ! peer->af_group[afi][safi])
@@ -120,10 +115,10 @@ index c9a04ff..fbc40df 100644
/* Remove private AS. */
if (peer_af_flag_check (peer, afi, safi, PEER_FLAG_REMOVE_PRIVATE_AS)
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
-index 0746f0d..1e41c00 100644
+index a1b1273..eae803d 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
-@@ -405,6 +405,7 @@ struct peer
+@@ -412,6 +412,7 @@ struct peer
#define PEER_FLAG_MAX_PREFIX (1 << 14) /* maximum prefix */
#define PEER_FLAG_MAX_PREFIX_WARNING (1 << 15) /* maximum prefix warning-only */
#define PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED (1 << 16) /* leave link-local nexthop unchanged */
@@ -131,6 +126,26 @@ index 0746f0d..1e41c00 100644
/* MD5 password */
char *password;
+diff --git a/doc/bgpd.texi b/doc/bgpd.texi
+index cb9789b..de70970 100644
+--- a/doc/bgpd.texi
++++ b/doc/bgpd.texi
+@@ -299,10 +299,12 @@ This command is deprecated and may be removed in a future release. Its
+ use should be avoided.
+ @end deffn
+
+-@deffn {BGP} {neighbor @var{peer} next-hop-self} {}
+-@deffnx {BGP} {no neighbor @var{peer} next-hop-self} {}
++@deffn {BGP} {neighbor @var{peer} next-hop-self [all]} {}
++@deffnx {BGP} {no neighbor @var{peer} next-hop-self [all]} {}
+ This command specifies an announced route's nexthop as being equivalent
+-to the address of the bgp router.
++to the address of the bgp router if it is learned via eBGP.
++If the optional keyword @code{all} is specified the modifiation is done
++also for routes learned via iBGP.
+ @end deffn
+
+ @deffn {BGP} {neighbor @var{peer} update-source @var{<ifname|address>}} {}
--
-1.9.2
+2.1.0
diff --git a/main/quagga/APKBUILD b/main/quagga/APKBUILD
index c8e11d0895..17d0831a9b 100644
--- a/main/quagga/APKBUILD
+++ b/main/quagga/APKBUILD
@@ -1,29 +1,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=quagga
-pkgver=0.99.23
-pkgrel=4
+pkgver=0.99.23.1
+pkgrel=0
pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP."
url="http://quagga.net/"
arch="all"
license="GPL-2"
depends="iproute2"
-makedepends="readline-dev ncurses-dev gawk texinfo perl net-snmp-dev
- autoconf automake"
+makedepends="readline-dev ncurses-dev gawk texinfo perl net-snmp-dev"
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
pkgusers="quagga"
pkggroups="quagga"
source="http://download.savannah.gnu.org/releases/quagga/quagga-$pkgver.tar.xz
- 0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
- 0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
- 0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
- 0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
- 0005-bgpd-fix-IP-endianness-in-debug-message.patch
- 0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
1001-bgpd-implement-next-hop-self-all.patch
- musl-linux-ipv6.patch
- musl-fix-headers.patch
- musl-fix-msghdr-usage.patch
bgpd.initd
zebra.initd
zebra.confd
@@ -37,7 +27,6 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
- autoreconf
}
build() {
@@ -81,45 +70,18 @@ package() {
install -Dm644 "$srcdir/zebra.confd" "$pkgdir"/etc/conf.d/zebra
install -o quagga -g quagga -d -m755 "$pkgdir"/etc/quagga
}
-md5sums="92dff03272aa9127ac13c6bea9c66187 quagga-0.99.23.tar.xz
-af552fbb454cfde2559d4cfa34bf9af3 0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
-d1441d208e8ecd676494b24dc45729d7 0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
-d2870b0ce97796503b2c284fc9668129 0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
-2be17285dba25b2d07e546f95745c4a1 0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
-d114d29e5463f910588b8a696af950bd 0005-bgpd-fix-IP-endianness-in-debug-message.patch
-265489d300fb6be9eb871fc3a29532ee 0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
-2e78b3ea20041f94ff99798d37e1456e 1001-bgpd-implement-next-hop-self-all.patch
-d4a0406996b4356237365a9c413be2c6 musl-linux-ipv6.patch
-df62890cccdb7d9c7cc9b96167b9da8c musl-fix-headers.patch
-1ee2755d3e81e9867c518107ba9bdced musl-fix-msghdr-usage.patch
+md5sums="da14aed6ae4be582486816f3eac2a46f quagga-0.99.23.1.tar.xz
+cb97c9d7e192ca05b64c9da909daa97a 1001-bgpd-implement-next-hop-self-all.patch
e80a3df594eba8b09e19aa28d9283698 bgpd.initd
33d0e34f11460881161ab930d3d3b987 zebra.initd
34e06a1d2bc602ce691abc9ed169dd15 zebra.confd"
-sha256sums="7f374da7bab275b9dd2be864ac6fb4e0552d455d6b15a7f1d7128f5208eadeee quagga-0.99.23.tar.xz
-afbf34bf84ed43d4a9ad9669adb5b3ffa7f8cd0a5993484032c5e7ddd50f474c 0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
-64c956e8a57bc8137b88ec373a03afd09dd37b463f6a9817db74f730227dea64 0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
-82e1aa8c89ad542fb97c5d296151aa855c491d5df9bb7c0c858e9674ec57b313 0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
-f9d6bb23ca06ad024c75d0dbd7b1c73faa6fbc649ab11d27be16245342a1bae5 0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
-3c8fb410e589d679b98715bb3fce95dba408393a6a8f62a15def20e57d882e37 0005-bgpd-fix-IP-endianness-in-debug-message.patch
-3b54a7af83a7bc2750930e9810a89709221067261b2d4326cadc7cd069beb334 0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
-979ed4f7a3e3b604a2cd3c717df467e253a4b75160f870343e6d96af0c9687ec 1001-bgpd-implement-next-hop-self-all.patch
-54e4e010b01a99675a6d1b6fad5dabfa8ac6527bfcfd9489300e6f34e8cc09b4 musl-linux-ipv6.patch
-f59f1f654e80ae9c80e6ea150e210d82aa799d44624fa361348fc242849d0ebc musl-fix-headers.patch
-797c02b58640b5c6677d6288c56c6275fd8b48094d83fabc82eb944f4573ea77 musl-fix-msghdr-usage.patch
+sha256sums="202e8b7fbec810f28a84e3fbb6aafdaf08a3b51527c258807abc8a74ed617eb8 quagga-0.99.23.1.tar.xz
+cd1a3cebe2e666fe95036dac5fe0b4c19772dc1d39859f5390c5c5d84695b8b3 1001-bgpd-implement-next-hop-self-all.patch
41471bfda120cb57bc0f40e87ec23a4f150d2b97c97ececdda6c408eab7cf9a3 bgpd.initd
d6cc9280df63859ba711ad2071b38b9ce317d718c34840a2b101debef3fa7b56 zebra.initd
f7a52d383f60270a5a8fee5d4ac522c5c0ec2b7c4b5252cff54e260f32d9b323 zebra.confd"
-sha512sums="c8072da8cec96e023ba8a53da7b2bbe6d709d13a7d03204245f6a15b70be81f88106be4864ecd552d84660cd40e89cf52260bc850f948352a3068fb08fd918e0 quagga-0.99.23.tar.xz
-6c4dd606f879098ee1d56149899e9ef213b7527cbb3a5236c6229dcd892a0da4975d3edfaf831b1d9acc884e677f76286d06041af169d5e09adf6bf600765478 0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
-86e363f8425630fc52fa9b88f949bde14fc1937a292ff44036b4661c23d004932788c62eaf324417b1296cc78a662a6355f122df78ad7f75b1aba6e141fb1260 0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
-7fb65225698f3a3730f0fd6714e3390c8dbad0bd5ba8c045812e07dcecc3ab967b2ff28c12de612a0c35b5eaa2058d05e31d77f574a932b97d4e422176be4d83 0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
-9133dfa4ff092303c5fb1f8d49d3180c4f29bfffceede8034a1bfd22449c78fb41fb23349749523b4357e5b5613d24d6740220aeabb3d6590029704b4b5678a4 0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
-bd99facfd6d4371d9982a8d56c36b924f6b4a8d0f4f61867ae26a07ca741bc0beb5c6522f138e4993b44e5a46f193e4f7ee7524861cbee6c823685190f73b1b9 0005-bgpd-fix-IP-endianness-in-debug-message.patch
-6bfcec805233c52a8c7b042eb501c78b861386e0645cba726e4d4bd02a300219541ae0b63ff78e7fd239c2c332560ac9b4f4efcb2a50682c1df95572dd3c45af 0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
-44677f3852b31f2f2776507b0da004431d12253b5897336d49525114a87945283a21d6dfe6162a73ff1f006fc235e31a753ac591aa70e6b8f4fbb3adb75e00f9 1001-bgpd-implement-next-hop-self-all.patch
-a645176d590e39717d01d81273a5940016c62a5d704c119c8589ac545e07adeb8fe95ffe9b4011c7b4cbeb5648bea0be7b9b8487dc411051f96ece5f1eafccc8 musl-linux-ipv6.patch
-b0cbef2d1544efa8a194aa4f05bd17225073dff7526bfa84a6068d7ae5806ff045c62c914999e1ecae04c4b251713aed5d5b0a6a98db6c3176ddf122d76894c7 musl-fix-headers.patch
-f0072ebcdde2f10216aa746831b5b11e49ba1a2b1499a416b7a35d80c5e2e30ae1da4f6128071d506d4f93e08bce560c1c5c7face244c8857957644044ee20ba musl-fix-msghdr-usage.patch
+sha512sums="7a222d4a5aa41deeb233f2e9ce922e5c29787c2f74c1b99177089e3183b69d3c0e4db5846676485a1990b728e007e687070ba4cecab67aa61f8be6c0851581cc quagga-0.99.23.1.tar.xz
+a8b7c2f8c4e31841b735f17e2476adfc5d0b9caee4808ade19774fedf8abf935f0afda1bf43e79606dd5aca821a11435b69c84eec3cd6860c24e35775ff0bc3e 1001-bgpd-implement-next-hop-self-all.patch
d2bf7e8f2da49d0b039e72e76a77860b5b49d41a80550d6dc84791bbdec1d52e579393c5d42b45aa615991742421fef53ec1b92a5e740779b6060e20f5dd0413 bgpd.initd
a4955fe54729ec8cb17b72f3d2205d0a4ba814a51a5eb3635a85339de9a2d2342e4814ef8b1e011803fa1dc3c6f9a23b178848e0812576876343104854feb723 zebra.initd
900972c6f98e561dfacf384111251db262326e8764b8c763a5ef639fa11c7949c03eef5e3bce324a4b1964fe45416d2db74ae1b6bc967f7d4ba48c2eeda017c4 zebra.confd"
diff --git a/main/quagga/musl-fix-headers.patch b/main/quagga/musl-fix-headers.patch
deleted file mode 100644
index b3e797c3b4..0000000000
--- a/main/quagga/musl-fix-headers.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- quagga-0.99.22.4.orig/lib/queue.h
-+++ quagga-0.99.22.4/lib/queue.h
-@@ -33,8 +33,6 @@
- #ifndef _SYS_QUEUE_H_
- #define _SYS_QUEUE_H_
-
--#include <sys/cdefs.h>
--
- /*
- * This file defines four types of data structures: singly-linked lists,
- * singly-linked tail queues, lists and tail queues.
---- quagga-0.99.22.4.orig/isisd/include-netbsd/iso.h
-+++ quagga-0.99.22.4/isisd/include-netbsd/iso.h
-@@ -192,7 +192,7 @@
- #else
- /* user utilities definitions from the iso library */
-
--#ifdef SUNOS_5
-+#ifndef __GLIBC__
- #define __P(x) x
- #define __BEGIN_DECLS
- #define __END_DECLS
diff --git a/main/quagga/musl-fix-msghdr-usage.patch b/main/quagga/musl-fix-msghdr-usage.patch
deleted file mode 100644
index 77ba1a3776..0000000000
--- a/main/quagga/musl-fix-msghdr-usage.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -ru quagga-0.99.23.orig/zebra/rt_netlink.c quagga-0.99.23/zebra/rt_netlink.c
---- quagga-0.99.23.orig/zebra/rt_netlink.c 2014-06-24 08:14:20.000000000 -0300
-+++ quagga-0.99.23/zebra/rt_netlink.c 2014-07-29 11:20:47.188233069 -0300
-@@ -282,9 +282,17 @@
- while (1)
- {
- char buf[NL_PKT_BUF_SIZE];
-- struct iovec iov = { buf, sizeof buf };
-+ struct iovec iov = {
-+ .iov_base = buf,
-+ .iov_len = sizeof buf
-+ };
- struct sockaddr_nl snl;
-- struct msghdr msg = { (void *) &snl, sizeof snl, &iov, 1, NULL, 0, 0 };
-+ struct msghdr msg = {
-+ .msg_name = (void *) &snl,
-+ .msg_namelen = sizeof snl,
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1
-+ };
- struct nlmsghdr *h;
-
- status = recvmsg (nl->sock, &msg, 0);
-@@ -1312,8 +1320,16 @@
- {
- int status;
- struct sockaddr_nl snl;
-- struct iovec iov = { (void *) n, n->nlmsg_len };
-- struct msghdr msg = { (void *) &snl, sizeof snl, &iov, 1, NULL, 0, 0 };
-+ struct iovec iov = {
-+ .iov_base = (void *) n,
-+ .iov_len = n->nlmsg_len
-+ };
-+ struct msghdr msg = {
-+ .msg_name = (void *) &snl,
-+ .msg_namelen = sizeof snl,
-+ .msg_iov = &iov,
-+ .msg_iovlen = 1,
-+ };
- int save_errno;
-
- memset (&snl, 0, sizeof snl);
diff --git a/main/quagga/musl-linux-ipv6.patch b/main/quagga/musl-linux-ipv6.patch
deleted file mode 100644
index 015963114f..0000000000
--- a/main/quagga/musl-linux-ipv6.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- quagga-0.99.23.orig/configure.ac 2014-06-24 08:14:20.000000000 -0300
-+++ quagga-0.99.23/configure.ac 2014-07-29 12:58:52.201839366 -0300
-@@ -1202,18 +1202,8 @@
- fi
-
- if test "$zebra_cv_linux_ipv6" = "yes";then
-- AC_MSG_CHECKING(for GNU libc >= 2.1)
- AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
-- AC_EGREP_CPP(yes, [
--#include <features.h>
--#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
-- yes
--#endif],
-- [glibc=yes
-- AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
-- AC_MSG_RESULT(yes)],
-- AC_MSG_RESULT(no)
-- )
-+ AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
- RIPNGD="ripngd"
- OSPF6D="ospf6d"
- if test "$glibc" != "yes"; then