[packages] quagga-unstable: update to v0.99.15, change dependencies on quagga libraries from depends to select, mark ripngd as broken cleanup

git-svn-id: svn://svn.openwrt.org/openwrt/packages@17946 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2009-10-06 03:44:16 +00:00
parent 3195d5d877
commit 5f428ba0cc
5 changed files with 60 additions and 140 deletions

View File

@ -8,16 +8,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=quagga-unstable
PKG_VERSION:=0.99.14
PKG_RELEASE:=2
PKG_MD5SUM:=3a075fd5e26ec6d52f4a51b14a2d3c2c
PKG_VERSION:=0.99.15
PKG_RELEASE:=1
PKG_SOURCE:=quagga-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.quagga.net/download/ \
http://www.de.quagga.net/download/ \
http://www.uk.quagga.net/download/
PKG_SOURCE:=quagga-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=8975414c76a295f4855a417af0b5ddce
PKG_BUILD_DIR:=$(BUILD_DIR)/quagga-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_quagga-unstable-isisd \
CONFIG_PACKAGE_quagga-unstable-ripngd \
include $(INCLUDE_DIR)/package.mk
define Package/quagga-unstable/Default
@ -52,7 +57,7 @@ endef
define Package/quagga-unstable-bgpd
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libzebra
DEPENDS+= +quagga-unstable-libzebra
TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
endef
@ -63,47 +68,51 @@ endef
define Package/quagga-unstable-ospfd
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libospf quagga-unstable-libzebra
DEPENDS+= +quagga-unstable-libospf +quagga-unstable-libzebra
TITLE:=OSPFv2 routing engine
endef
define Package/quagga-unstable-ospf6d
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libospf quagga-unstable-libzebra @IPV6
DEPENDS+= +quagga-unstable-libospf +quagga-unstable-libzebra @IPV6
TITLE:=OSPFv3 routing engine
endef
define Package/quagga-unstable-ripd
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libzebra
DEPENDS+= +quagga-unstable-libzebra
TITLE:=RIP routing engine
endef
define Package/quagga-unstable-ripngd
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libzebra
DEPENDS+= +quagga-unstable-libzebra @BROKEN
TITLE:=RIPNG routing engine
endef
define Package/quagga-unstable-vtysh
$(call Package/quagga-unstable/Default)
DEPENDS += quagga-unstable-libzebra +libreadline +libncurses
DEPENDS+= quagga-unstable-libzebra +libreadline +libncurses
TITLE:=integrated shell for Quagga routing software
endef
define Build/Configure
$(call Build/Configure/Default, \
--localstatedir=/var/run/quagga \
--sysconfdir=/etc/quagga/ \
--enable-shared \
--disable-static \
--enable-vtysh \
--enable-user=quagga \
--enable-group=quagga \
--enable-multipath=8 \
--enable-isisd \
)
endef
CONFIGURE_ARGS+= \
--localstatedir=/var/run/quagga \
--sysconfdir=/etc/quagga/ \
--enable-shared \
--disable-static \
--enable-vtysh \
--enable-user=quagga \
--enable-group=quagga \
--enable-multipath=8 \
ifneq ($(CONFIG_PACKAGE_quagga-unstable-isisd),)
CONFIGURE_ARGS+= --enable-isisd
endif
ifneq ($(CONFIG_PACKAGE_quagga-unstable-ripngd),)
CONFIGURE_ARGS+= --enable-ripngd
endif
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
@ -113,13 +122,13 @@ endef
define Package/quagga-unstable/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
# avoid /etc being set to 0750
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
$(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
endef
@ -174,55 +183,55 @@ endef
define Package/quagga-unstable-bgpd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
endef
define Package/quagga-unstable-isisd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
endef
define Package/quagga-unstable-ospfd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
endef
define Package/quagga-unstable-ospf6d/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
endef
define Package/quagga-unstable-ripd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
endef
define Package/quagga-unstable-ripngd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga/
chmod 0750 $(1)/etc/quagga/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/quagga
chmod 0750 $(1)/etc/quagga
$(INSTALL_DATA) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
endef
define Package/quagga-unstable-vtysh/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
endef
define Package/quagga-unstable-libospf/install
@ -232,7 +241,7 @@ endef
define Package/quagga-unstable-libzebra/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,quagga-unstable))

View File

@ -247,7 +247,7 @@
/* Initialisation of zebra and installation of commands. */
void
zebra_init (void)
@@ -1715,6 +1804,10 @@ zebra_init (void)
@@ -1708,6 +1797,10 @@ zebra_init (void)
install_node (&table_node, config_write_table);
install_node (&forwarding_node, config_write_forwarding);
@ -258,7 +258,7 @@
install_element (VIEW_NODE, &show_ip_forwarding_cmd);
install_element (ENABLE_NODE, &show_ip_forwarding_cmd);
install_element (CONFIG_NODE, &ip_forwarding_cmd);
@@ -1725,6 +1818,14 @@ zebra_init (void)
@@ -1718,6 +1811,14 @@ zebra_init (void)
install_element (VIEW_NODE, &show_table_cmd);
install_element (ENABLE_NODE, &show_table_cmd);
install_element (CONFIG_NODE, &config_table_cmd);

View File

@ -1,76 +0,0 @@
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -1122,6 +1122,42 @@ aspath_private_as_check (struct aspath *
return 1;
}
+/* AS path confed check. If aspath contains confed set or sequence then return 1. */
+int
+aspath_confed_check (struct aspath *aspath)
+{
+ struct assegment *seg;
+
+ if ( !(aspath && aspath->segments) )
+ return 0;
+
+ seg = aspath->segments;
+
+ while (seg)
+ {
+ if (seg->type == AS_CONFED_SET || seg->type == AS_CONFED_SEQUENCE)
+ return 1;
+ seg = seg->next;
+ }
+ return 0;
+}
+
+/* Leftmost AS path segment confed check. If leftmost AS segment is of type
+ AS_CONFED_SEQUENCE or AS_CONFED_SET then return 1. */
+int
+aspath_left_confed_check (struct aspath *aspath)
+{
+
+ if ( !(aspath && aspath->segments) )
+ return 0;
+
+ if ( (aspath->segments->type == AS_CONFED_SEQUENCE)
+ || (aspath->segments->type == AS_CONFED_SET) )
+ return 1;
+
+ return 0;
+}
+
/* Merge as1 to as2. as2 should be uninterned aspath. */
static struct aspath *
aspath_merge (struct aspath *as1, struct aspath *as2)
--- a/bgpd/bgp_aspath.h
+++ b/bgpd/bgp_aspath.h
@@ -88,6 +88,8 @@ extern unsigned int aspath_key_make (voi
extern int aspath_loop_check (struct aspath *, as_t);
extern int aspath_private_as_check (struct aspath *);
extern int aspath_firstas_check (struct aspath *, as_t);
+extern int aspath_confed_check (struct aspath *);
+extern int aspath_left_confed_check (struct aspath *);
extern unsigned long aspath_count (void);
extern unsigned int aspath_count_hops (struct aspath *);
extern unsigned int aspath_count_confeds (struct aspath *);
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -872,6 +872,17 @@ static int bgp_attr_aspath_check( struct
bgp = peer->bgp;
+ /* Confederation sanity check. */
+ if ((peer_sort (peer) == BGP_PEER_CONFED && ! aspath_left_confed_check (attr->aspath)) ||
+ (peer_sort (peer) == BGP_PEER_EBGP && aspath_confed_check (attr->aspath)))
+ {
+ zlog (peer->log, LOG_ERR, "Malformed AS path from %s", peer->host);
+ bgp_notify_send (peer,
+ BGP_NOTIFY_UPDATE_ERR,
+ BGP_NOTIFY_UPDATE_MAL_AS_PATH);
+ return -1;
+ }
+
/* First AS check for EBGP. */
if (bgp != NULL && bgp_flag_check (bgp, BGP_FLAG_ENFORCE_FIRST_AS))
{

View File

@ -1,13 +0,0 @@
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -1208,6 +1208,10 @@ aspath_prepend (struct aspath *as1, stru
while (seg1 && seg1->next)
seg1 = seg1->next;
+ /* Delete any AS_CONFED_SEQUENCE segment from as2. */
+ if (seg1->type == AS_SEQUENCE && seg2->type == AS_CONFED_SEQUENCE)
+ as2 = aspath_delete_confed_seq (as2);
+
/* Compare last segment type of as1 and first segment type of as2. */
if (seg1->type != seg2->type)
return aspath_merge (as1, as2);

View File

@ -1,6 +1,6 @@
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -185,8 +185,7 @@ bgp_accept (struct thread *thread)
@@ -188,8 +188,7 @@ bgp_accept (struct thread *thread)
peer->fd = bgp_sock;
peer->status = Active;
peer->local_id = peer1->local_id;