From 99429cabcec71cf00f90dee63a48a0eb9c3c3820 Mon Sep 17 00:00:00 2001 From: Vasilis Tsiligiannis Date: Fri, 15 Oct 2010 21:43:27 +0000 Subject: [PATCH] quagga{,-unstable}: Merge quagga-unstable package with quagga package * Switch to quagga 0.99.x for stable version * Add menuconfig option to allow selection of old 0.98.6 version * Makefile cleanups SVN-Revision: 23464 --- net/quagga-unstable/Makefile | 284 ------ net/quagga-unstable/files/quagga | 333 ------- net/quagga-unstable/files/quagga.conf | 7 - net/quagga-unstable/files/quagga.init | 11 - .../patches/002-quagga_manet.patch | 845 ----------------- net/quagga/Config.in | 17 + net/quagga/Makefile | 38 +- .../001-quagga_cross.patch | 0 .../001-quagga_readline.patch | 0 net/quagga/patches-old/002-quagga_manet.patch | 855 ++++++++++++++++++ .../100-confederation.patch | 0 .../120-confed_errorhandle.patch | 0 .../130-netlink_ignore_wireless.patch | 0 .../patches-old}/140-holdtimer-set.patch | 6 +- .../patches-old}/150-no-cross-fs-link.patch | 14 +- .../patches/000-upstream-bogus_cond.patch | 0 .../patches/000-upstream-miss_str.patch | 0 .../patches/000-upstream-set_null.patch | 0 .../patches/001-fix_ipctl_forwarding.patch | 0 net/quagga/patches/002-quagga_manet.patch | 810 ++++++++--------- .../patches/010-fix_cpp.patch | 0 .../100-quagga_multipath_caching_policy.patch | 0 net/quagga/patches/140-holdtimer-set.patch | 6 +- net/quagga/patches/150-no-cross-fs-link.patch | 14 +- 24 files changed, 1317 insertions(+), 1923 deletions(-) delete mode 100644 net/quagga-unstable/Makefile delete mode 100644 net/quagga-unstable/files/quagga delete mode 100644 net/quagga-unstable/files/quagga.conf delete mode 100644 net/quagga-unstable/files/quagga.init delete mode 100644 net/quagga-unstable/patches/002-quagga_manet.patch create mode 100644 net/quagga/Config.in rename net/quagga/{patches => patches-old}/001-quagga_cross.patch (100%) rename net/quagga/{patches => patches-old}/001-quagga_readline.patch (100%) create mode 100644 net/quagga/patches-old/002-quagga_manet.patch rename net/quagga/{patches => patches-old}/100-confederation.patch (100%) rename net/quagga/{patches => patches-old}/120-confed_errorhandle.patch (100%) rename net/quagga/{patches => patches-old}/130-netlink_ignore_wireless.patch (100%) rename net/{quagga-unstable/patches => quagga/patches-old}/140-holdtimer-set.patch (78%) rename net/{quagga-unstable/patches => quagga/patches-old}/150-no-cross-fs-link.patch (82%) rename net/{quagga-unstable => quagga}/patches/000-upstream-bogus_cond.patch (100%) rename net/{quagga-unstable => quagga}/patches/000-upstream-miss_str.patch (100%) rename net/{quagga-unstable => quagga}/patches/000-upstream-set_null.patch (100%) rename net/{quagga-unstable => quagga}/patches/001-fix_ipctl_forwarding.patch (100%) rename net/{quagga-unstable => quagga}/patches/010-fix_cpp.patch (100%) rename net/{quagga-unstable => quagga}/patches/100-quagga_multipath_caching_policy.patch (100%) diff --git a/net/quagga-unstable/Makefile b/net/quagga-unstable/Makefile deleted file mode 100644 index 09954e24d..000000000 --- a/net/quagga-unstable/Makefile +++ /dev/null @@ -1,284 +0,0 @@ -# -# Copyright (C) 2009-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=quagga-unstable -PKG_VERSION:=0.99.17 -PKG_RELEASE:=2 - -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_MD5SUM:=37b9022adca04b03863d2d79787e643f - -PKG_BUILD_PARALLEL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/quagga-$(PKG_VERSION) - -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_quagga-unstable-isisd \ - CONFIG_PACKAGE_quagga-unstable-ripngd - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/quagga-unstable/Default - SECTION:=net - CATEGORY:=Network - DEPENDS:=quagga-unstable - TITLE:=The Quagga Software Routing Suite - URL:=http://www.quagga.net - MAINTAINER:=Vasilis Tsiligiannis -endef - -define Package/quagga-unstable - $(call Package/quagga-unstable/Default) - DEPENDS:= +librt - MENU:=1 -endef - -define Package/quagga-unstable/description - A routing software package that provides TCP/IP based routing services - with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2, - OSPFv3, BGP-4, and BGP-4+ -endef - -define Package/quagga-unstable-libzebra - $(call Package/quagga-unstable/Default) - TITLE:=zebra library -endef - -define Package/quagga-unstable-libospf - $(call Package/quagga-unstable/Default) - TITLE:=OSPF library -endef - -define Package/quagga-unstable-bgpd - $(call Package/quagga-unstable/Default) - DEPENDS+= +quagga-unstable-libzebra - TITLE:=BGPv4, BGPv4+, BGPv4- routing engine -endef - -define Package/quagga-unstable-isisd - $(call Package/quagga-unstable/Default) - TITLE:=IS-IS routing engine -endef - -define Package/quagga-unstable-ospfd - $(call Package/quagga-unstable/Default) - 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 - TITLE:=OSPFv3 routing engine -endef - -define Package/quagga-unstable-ripd - $(call Package/quagga-unstable/Default) - DEPENDS+= +quagga-unstable-libzebra - TITLE:=RIP routing engine -endef - -define Package/quagga-unstable-ripngd - $(call Package/quagga-unstable/Default) - 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 - TITLE:=integrated shell for Quagga routing software -endef - -define Package/quagga-unstable/conffiles -/etc/quagga/zebra.conf -endef - -define Package/quagga-unstable-bgpd/conffiles -/etc/quagga/bgpd.conf -endef - -define Package/quagga-unstable-isisd/conffiles -/etc/quagga/isisd.conf -endef - -define Package/quagga-unstable-ospfd/conffiles -/etc/quagga/ospfd.conf -endef - -define Package/quagga-unstable-ospf6d/conffiles -/etc/quagga/ospf6d.conf -endef - -define Package/quagga-unstable-ripd/conffiles -/etc/quagga/ripd.conf -endef - -define Package/quagga-unstable-ripngd/conffiles -/etc/quagga/ripngd.conf -endef - -CONFIGURE_ARGS+= \ - --localstatedir=/var/run/quagga \ - --sysconfdir=/etc/quagga/ \ - --enable-shared \ - --disable-static \ - --enable-vtysh \ - --enable-user=quagga \ - --enable-group=quagga \ - --enable-pie=no \ - --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 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/ - # avoid /etc being set to 0750 - $(INSTALL_DIR) $(1)/etc/quagga - chmod 0750 $(1)/etc/quagga - $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf - $(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 - -define Package/quagga-unstable/postinst -#!/bin/sh - -name=quagga -id=51 - -# do not change below -# check if we are on real system -if [ -z "$${IPKG_INSTROOT}" ]; then - # create copies of passwd and group, if we use squashfs - rootfs=`mount |awk '/root/ { print $$5 }'` - if [ "$$rootfs" = "squashfs" ]; then - if [ -h /etc/group ]; then - rm /etc/group - cp /rom/etc/group /etc/group - fi - if [ -h /etc/passwd ]; then - rm /etc/passwd - cp /rom/etc/passwd /etc/passwd - fi - fi -fi - -echo "" -if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then - echo "adding group $$name to /etc/group" - echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group -fi - -if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then - echo "adding user $$name to /etc/passwd" - echo "$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd -fi - -grep -q '^zebra[[:space:]]*2601/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null -if [ $$? -ne 0 ]; then -echo "zebrasrv 2600/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "zebra 2601/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "ripd 2602/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "ripngd 2603/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "ospfd 2604/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "bgpd 2605/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "ospf6d 2606/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "ospfapi 2607/tcp" >>$${IPKG_INSTROOT}/etc/services -echo "isisd 2608/tcp" >>$${IPKG_INSTROOT}/etc/services -fi -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 - $(INSTALL_CONF) ./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 - $(INSTALL_CONF) ./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 - $(INSTALL_CONF) ./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 - $(INSTALL_CONF) ./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 - $(INSTALL_CONF) ./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 - $(INSTALL_CONF) ./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/ -endef - -define Package/quagga-unstable-libospf/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/ -endef - -define Package/quagga-unstable-libzebra/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,quagga-unstable)) -$(eval $(call BuildPackage,quagga-unstable-libzebra)) -$(eval $(call BuildPackage,quagga-unstable-libospf)) -$(eval $(call BuildPackage,quagga-unstable-bgpd)) -$(eval $(call BuildPackage,quagga-unstable-isisd)) -$(eval $(call BuildPackage,quagga-unstable-ospfd)) -$(eval $(call BuildPackage,quagga-unstable-ospf6d)) -$(eval $(call BuildPackage,quagga-unstable-ripd)) -$(eval $(call BuildPackage,quagga-unstable-ripngd)) -$(eval $(call BuildPackage,quagga-unstable-vtysh)) diff --git a/net/quagga-unstable/files/quagga b/net/quagga-unstable/files/quagga deleted file mode 100644 index cf6855ce8..000000000 --- a/net/quagga-unstable/files/quagga +++ /dev/null @@ -1,333 +0,0 @@ -#!/bin/sh -# -# quagga Starts/stops quagga daemons and watchquagga. -# Create a daemon.conf file to have that routing daemon -# started/stopped automagically when using this script -# without any daemon names as args. -# If watchquagga is available, it will also be -# started/stopped if the script is called without -# any daemon names. -# - -ME=$(basename $0) - -usage() { - echo "Usage: ${ME} {start|stop|restart} [daemon ...]" - exit 2 -} - -if [ -z "$1" ] -then - usage -else - COMMAND=$1 -fi -shift -ARG_DAEMONS=$* -BINDIR=/usr/sbin -CONFDIR=/etc/quagga -STATEDIR=/var/run/quagga -DAEMONS="zebra ripd ripngd ospfd ospf6d bgpd" -DAEMON_FLAGS=-d -WATCHQUAGGA_FLAGS="-d -z -T 60 -R" -WATCHQUAGGA_CMD="$0 watchrestart" -if [ ${COMMAND} != "watchrestart" ] -then - DAEMONS="${DAEMONS} watchquagga" -fi -DAEMONS_STARTSEQ=${DAEMONS} - -reverse() -{ - local revlist r - revlist= - for r - do - revlist="$r $revlist" - done - echo $revlist -} - -DAEMONS_STOPSEQ=$(reverse ${DAEMONS_STARTSEQ}) - -#pidof() { -# ps ax | awk 'match($5, "(^|/)'"$1"'$") > 0 { printf " %s", $1 }' -#} - -quit() { - echo "${ME}: $1" - exit 0 -} - -die() { - echo "${ME}: $1" - exit 1 -} - -is_in() { - local i - for i in $2 - do - [ "$1" = "$i" ] && return 0 - done - return 1 -} - -select_subset() { - local unknown i j - unknown= - RESULT= - for i in $1 - do - is_in $i "$2" || unknown="$unknown $i" - done - if [ -n "$unknown" ] - then - RESULT=$unknown - return 1 - else - for j in $2 - do - is_in $j "$1" && RESULT="$RESULT $j" - done - return 0 - fi -} - -# check command - -case ${COMMAND} -in - start|stop|restart) - ;; - watchrestart) - if [ -n "$ARG_DAEMONS" ] - then - echo "${ME}: watchrestart mode is only for use by watchquagga" - exit 2 - fi - ;; - *) - usage - ;; -esac - -# select daemons to start - -case ${COMMAND} -in - start|restart|watchrestart) - START_DAEMONS= - for d in ${DAEMONS_STARTSEQ} - do - [ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \ - && START_DAEMONS="${START_DAEMONS}${d} " - done - WATCHQUAGGA_DAEMONS=${START_DAEMONS} - if is_in watchquagga "${DAEMONS_STARTSEQ}" - then - START_DAEMONS="${START_DAEMONS} watchquagga" - fi - if [ -n "${ARG_DAEMONS}" ] - then - if select_subset "${ARG_DAEMONS}" "${DAEMONS}" - then - if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}" - then - START_DAEMONS=${RESULT} - else - die "these daemons are not startable:${RESULT}." - fi - else - die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." - fi - fi - ;; -esac - -# select daemons to stop - -case ${COMMAND} -in - stop|restart|watchrestart) - STOP_DAEMONS=${DAEMONS_STOPSEQ} - if [ -n "${ARG_DAEMONS}" ] - then - if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}" - then - STOP_DAEMONS=${RESULT} - else - die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." - fi - fi - stop_daemons= - for d in ${STOP_DAEMONS} - do - pidfile=${STATEDIR}/${d}.pid - if [ -f "${pidfile}" -o -n "$(pidof ${d})" ] - then - stop_daemons="${stop_daemons}${d} " - elif [ -n "${ARG_DAEMONS}" ] - then - echo "${ME}: found no ${d} process running." - fi - done - STOP_DAEMONS=${stop_daemons} - ;; -esac - -# stop daemons - -for d in $STOP_DAEMONS -do - echo -n "${ME}: Stopping ${d} ... " - pidfile=${STATEDIR}/${d}.pid - if [ -f "${pidfile}" ] - then - file_pid=$(cat ${pidfile}) - if [ -z "${file_pid}" ] - then - echo -n "no pid file entry found ... " - fi - else - file_pid= - echo -n "no pid file found ... " - fi - proc_pid=$(pidof ${d}) - if [ -z "${proc_pid}" ] - then - echo -n "found no ${d} process running ... " - else - count=0 - notinpidfile= - for p in ${proc_pid} - do - count=$((${count}+1)) - if kill ${p} - then - echo -n "killed ${p} ... " - else - echo -n "failed to kill ${p} ... " - fi - [ "${p}" = "${file_pid}" ] \ - || notinpidfile="${notinpidfile} ${p}" - done - [ ${count} -le 1 ] \ - || echo -n "WARNING: ${count} ${d} processes were found running ... " - for n in ${notinpidfile} - do - echo -n "WARNING: process ${n} was not in pid file ... " - done - fi - count=0 - survivors=$(pidof ${d}) - while [ -n "${survivors}" ] - do - sleep 1 - count=$((${count}+1)) - survivors=$(pidof ${d}) - [ -z "${survivors}" -o ${count} -gt 5 ] && break - for p in ${survivors} - do - sleep 1 - echo -n "${p} " - kill ${p} - done - done - survivors=$(pidof ${d}) - [ -n "${survivors}" ] && \ - if kill -KILL ${survivors} - then - echo -n "KILLed ${survivors} ... " - else - echo -n "failed to KILL ${survivors} ... " - fi - sleep 1 - survivors=$(pidof ${d}) - if [ -z "${survivors}" ] - then - echo -n "done." - if [ -f "${pidfile}" ] - then - rm -f ${pidfile} \ - || echo -n " Failed to remove pidfile." - fi - else - echo -n "failed to stop ${survivors} - giving up." - if [ "${survivors}" != "${file_pid}" ] - then - if echo "${survivors}" > ${pidfile} - then - chown quagga:quagga ${pidfile} - echo -n " Wrote ${survivors} to pidfile." - else - echo -n " Failed to write ${survivors} to pidfile." - fi - fi - fi - echo -done - -# start daemons - -if [ -n "$START_DAEMONS" ] -then - [ -d ${CONFDIR} ] \ - || quit "${ME}: no config directory ${CONFDIR} - exiting." - chown -R quagga:quagga ${CONFDIR} - [ -d ${STATEDIR} ] || mkdir -p ${STATEDIR} \ - || die "${ME}: could not create state directory ${STATEDIR} - exiting." - chown -R quagga:quagga ${STATEDIR} - - for d in $START_DAEMONS - do - echo -n "${ME}: Starting ${d} ... " - proc_pid=$(pidof ${d}) - pidfile=${STATEDIR}/${d}.pid - file_pid= - if [ -f "${pidfile}" ] - then - file_pid=$(cat ${pidfile}) - if [ -n "${file_pid}" ] - then - echo -n "found old pid file entry ${file_pid} ... " - fi - fi - if [ -n "${proc_pid}" ] - then - echo -n "found ${d} running (${proc_pid}) - skipping ${d}." - if [ "${proc_pid}" != "${file_pid}" ] - then - if echo "${proc_pid}" > ${pidfile} - then - chown quagga:quagga ${pidfile} - echo -n " Wrote ${proc_pid} to pidfile." - else - echo -n " Failed to write ${proc_pid} to pidfile." - fi - fi - elif rm -f "${pidfile}" - then - if [ "${d}" = "watchquagga" ] - then - "${BINDIR}/${d}" \ - ${WATCHQUAGGA_FLAGS} \ - "${WATCHQUAGGA_CMD}" \ - ${WATCHQUAGGA_DAEMONS} - status=$? - else - "${BINDIR}/${d}" ${DAEMON_FLAGS} - status=$? - fi - if [ $status -eq 0 ] - then - echo -n "done." - else - echo -n "failed." - fi - else - echo -n " failed to remove pidfile." - fi - echo - done -fi diff --git a/net/quagga-unstable/files/quagga.conf b/net/quagga-unstable/files/quagga.conf deleted file mode 100644 index fb7a54e33..000000000 --- a/net/quagga-unstable/files/quagga.conf +++ /dev/null @@ -1,7 +0,0 @@ -password zebra -! -access-list vty permit 127.0.0.0/8 -access-list vty deny any -! -line vty - access-class vty diff --git a/net/quagga-unstable/files/quagga.init b/net/quagga-unstable/files/quagga.init deleted file mode 100644 index 21fbf2c3a..000000000 --- a/net/quagga-unstable/files/quagga.init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org - -START=60 -start() { - /usr/sbin/quagga.init start -} - -stop() { - /usr/sbin/quagga.init stop -} diff --git a/net/quagga-unstable/patches/002-quagga_manet.patch b/net/quagga-unstable/patches/002-quagga_manet.patch deleted file mode 100644 index abbcd489f..000000000 --- a/net/quagga-unstable/patches/002-quagga_manet.patch +++ /dev/null @@ -1,845 +0,0 @@ ---- a/bgpd/bgp_vty.c -+++ b/bgpd/bgp_vty.c -@@ -8228,8 +8228,14 @@ bgp_str2route_type (int afi, const char - return ZEBRA_ROUTE_STATIC; - else if (strncmp (str, "r", 1) == 0) - return ZEBRA_ROUTE_RIP; -- else if (strncmp (str, "o", 1) == 0) -+ else if (strncmp (str, "os", 2) == 0) - return ZEBRA_ROUTE_OSPF; -+ else if (strncmp (str, "h", 1) == 0) -+ return ZEBRA_ROUTE_HSLS; -+ else if (strncmp (str, "ol", 2) == 0) -+ return ZEBRA_ROUTE_OLSR; -+ else if (strncmp (str, "b", 1) == 0) -+ return ZEBRA_ROUTE_BATMAN; - } - if (afi == AFI_IP6) - { -@@ -8241,21 +8247,30 @@ bgp_str2route_type (int afi, const char - return ZEBRA_ROUTE_STATIC; - else if (strncmp (str, "r", 1) == 0) - return ZEBRA_ROUTE_RIPNG; -- else if (strncmp (str, "o", 1) == 0) -+ else if (strncmp (str, "os", 2) == 0) - return ZEBRA_ROUTE_OSPF6; -+ else if (strncmp (str, "h", 1) == 0) -+ return ZEBRA_ROUTE_HSLS; -+ else if (strncmp (str, "ol", 2) == 0) -+ return ZEBRA_ROUTE_OLSR; -+ else if (strncmp (str, "b", 1) == 0) -+ return ZEBRA_ROUTE_BATMAN; - } - return 0; - } - - DEFUN (bgp_redistribute_ipv4, - bgp_redistribute_ipv4_cmd, -- "redistribute (connected|kernel|ospf|rip|static)", -+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" -- "Static routes\n") -+ "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") - { - int type; - -@@ -8270,13 +8285,16 @@ DEFUN (bgp_redistribute_ipv4, - - DEFUN (bgp_redistribute_ipv4_rmap, - bgp_redistribute_ipv4_rmap_cmd, -- "redistribute (connected|kernel|ospf|rip|static) route-map WORD", -+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n") - { -@@ -8295,13 +8313,16 @@ DEFUN (bgp_redistribute_ipv4_rmap, - - DEFUN (bgp_redistribute_ipv4_metric, - bgp_redistribute_ipv4_metric_cmd, -- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n") - { -@@ -8322,13 +8343,16 @@ DEFUN (bgp_redistribute_ipv4_metric, - - DEFUN (bgp_redistribute_ipv4_rmap_metric, - bgp_redistribute_ipv4_rmap_metric_cmd, -- "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" -@@ -8352,13 +8376,16 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric - - DEFUN (bgp_redistribute_ipv4_metric_rmap, - bgp_redistribute_ipv4_metric_rmap_cmd, -- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", -+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" -@@ -8382,14 +8409,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap - - DEFUN (no_bgp_redistribute_ipv4, - no_bgp_redistribute_ipv4_cmd, -- "no redistribute (connected|kernel|ospf|rip|static)", -+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" -- "Static routes\n") -+ "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") - { - int type; - -@@ -8405,7 +8435,7 @@ DEFUN (no_bgp_redistribute_ipv4, - - DEFUN (no_bgp_redistribute_ipv4_rmap, - no_bgp_redistribute_ipv4_rmap_cmd, -- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD", -+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8413,6 +8443,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n") - { -@@ -8431,7 +8464,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, - - DEFUN (no_bgp_redistribute_ipv4_metric, - no_bgp_redistribute_ipv4_metric_cmd, -- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8439,6 +8472,9 @@ DEFUN (no_bgp_redistribute_ipv4_metric, - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n") - { -@@ -8457,7 +8493,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, - - DEFUN (no_bgp_redistribute_ipv4_rmap_metric, - no_bgp_redistribute_ipv4_rmap_metric_cmd, -- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8465,6 +8501,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" -@@ -8486,7 +8525,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met - - ALIAS (no_bgp_redistribute_ipv4_rmap_metric, - no_bgp_redistribute_ipv4_metric_rmap_cmd, -- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", -+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8494,6 +8533,9 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met - "Open Shurtest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" -@@ -8502,13 +8544,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met - #ifdef HAVE_IPV6 - DEFUN (bgp_redistribute_ipv6, - bgp_redistribute_ipv6_cmd, -- "redistribute (connected|kernel|ospf6|ripng|static)", -+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" -- "Static routes\n") -+ "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") - { - int type; - -@@ -8524,13 +8569,16 @@ DEFUN (bgp_redistribute_ipv6, - - DEFUN (bgp_redistribute_ipv6_rmap, - bgp_redistribute_ipv6_rmap_cmd, -- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", -+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n") - { -@@ -8549,13 +8597,16 @@ DEFUN (bgp_redistribute_ipv6_rmap, - - DEFUN (bgp_redistribute_ipv6_metric, - bgp_redistribute_ipv6_metric_cmd, -- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n") - { -@@ -8576,13 +8627,16 @@ DEFUN (bgp_redistribute_ipv6_metric, - - DEFUN (bgp_redistribute_ipv6_rmap_metric, - bgp_redistribute_ipv6_rmap_metric_cmd, -- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" -@@ -8606,13 +8660,16 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric - - DEFUN (bgp_redistribute_ipv6_metric_rmap, - bgp_redistribute_ipv6_metric_rmap_cmd, -- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", -+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" -@@ -8636,14 +8693,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap - - DEFUN (no_bgp_redistribute_ipv6, - no_bgp_redistribute_ipv6_cmd, -- "no redistribute (connected|kernel|ospf6|ripng|static)", -+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" - "Kernel routes\n" - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" -- "Static routes\n") -+ "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") - { - int type; - -@@ -8659,7 +8719,7 @@ DEFUN (no_bgp_redistribute_ipv6, - - DEFUN (no_bgp_redistribute_ipv6_rmap, - no_bgp_redistribute_ipv6_rmap_cmd, -- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", -+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8667,6 +8727,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n") - { -@@ -8685,7 +8748,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, - - DEFUN (no_bgp_redistribute_ipv6_metric, - no_bgp_redistribute_ipv6_metric_cmd, -- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8693,6 +8756,9 @@ DEFUN (no_bgp_redistribute_ipv6_metric, - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n") - { -@@ -8711,7 +8777,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, - - DEFUN (no_bgp_redistribute_ipv6_rmap_metric, - no_bgp_redistribute_ipv6_rmap_metric_cmd, -- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8719,6 +8785,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" -@@ -8740,7 +8809,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met - - ALIAS (no_bgp_redistribute_ipv6_rmap_metric, - no_bgp_redistribute_ipv6_metric_rmap_cmd, -- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", -+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Connected\n" -@@ -8748,6 +8817,9 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met - "Open Shurtest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" - "Static routes\n" -+ "Hazy-Sighted Link State Protocol (HSLS)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" ---- a/lib/log.c -+++ b/lib/log.c -@@ -835,6 +835,8 @@ static const struct zebra_desc_table rou - DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ), - DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ), - DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ), -+ DESC_ENTRY (ZEBRA_ROUTE_OLSR, "olsr", 'o' ), -+ DESC_ENTRY (ZEBRA_ROUTE_BATMAN, "batman", 'b' ), - }; - #undef DESC_ENTRY - ---- a/lib/route_types.txt -+++ b/lib/route_types.txt -@@ -51,13 +51,9 @@ ZEBRA_ROUTE_OSPF, ospf, ospfd - ZEBRA_ROUTE_OSPF6, ospf6, ospf6d, 'O', 0, 1, "OSPF" - ZEBRA_ROUTE_ISIS, isis, isisd, 'I', 1, 1, "IS-IS" - ZEBRA_ROUTE_BGP, bgp, bgpd, 'B', 1, 1, "BGP" --# HSLS and OLSR both are AFI independent (so: 1, 1), however --# we want to disable for them for general Quagga distribution. --# This at least makes it trivial for users of these protocols --# to 'switch on' redist support (direct numeric entry remaining --# possible). --ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 0, 0, "HSLS" --ZEBRA_ROUTE_OLSR, olsr, oslrd, 'o', 0, 0, "OLSR" -+ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 1, 1, "HSLS" -+ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 1, 1, "OLSR" -+ZEBRA_ROUTE_BATMAN, batman, batmand,'b', 1, 1, "BATMAN" - - ## help strings - ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" -@@ -71,4 +67,5 @@ ZEBRA_ROUTE_OSPF6, "Open Shortest Path - ZEBRA_ROUTE_ISIS, "Intermediate System to Intermediate System (IS-IS)" - ZEBRA_ROUTE_BGP, "Border Gateway Protocol (BGP)" - ZEBRA_ROUTE_HSLS, "Hazy-Sighted Link State Protocol (HSLS)" --ZEBRA_ROUTE_OLSR, "Optimised Link State Routing (OLSR)" -+ZEBRA_ROUTE_OLSR, "Optimized Link State Routing (OLSR)" -+ZEBRA_ROUTE_BATMAN, "Better Approach to Mobile Ad-Hoc Networking (BATMAN)" ---- a/lib/zebra.h -+++ b/lib/zebra.h -@@ -441,7 +441,9 @@ struct in_pktinfo - #define ZEBRA_ROUTE_ISIS 8 - #define ZEBRA_ROUTE_BGP 9 - #define ZEBRA_ROUTE_HSLS 10 --#define ZEBRA_ROUTE_MAX 11 -+#define ZEBRA_ROUTE_OLSR 11 -+#define ZEBRA_ROUTE_BATMAN 12 -+#define ZEBRA_ROUTE_MAX 13 - - /* Note: whenever a new route-type or zserv-command is added the - * corresponding {command,route}_types[] table in lib/log.c MUST be ---- a/ospf6d/ospf6_asbr.c -+++ b/ospf6d/ospf6_asbr.c -@@ -616,13 +616,16 @@ ospf6_asbr_redistribute_remove (int type - - DEFUN (ospf6_redistribute, - ospf6_redistribute_cmd, -- "redistribute (static|kernel|connected|ripng|bgp)", -+ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", - "Redistribute\n" - "Static route\n" - "Kernel route\n" - "Connected route\n" - "RIPng route\n" - "BGP route\n" -+ "HSLS route\n" -+ "OLSR route\n" -+ "BATMAN route\n" - ) - { - int type = 0; -@@ -637,6 +640,12 @@ DEFUN (ospf6_redistribute, - type = ZEBRA_ROUTE_RIPNG; - else if (strncmp (argv[0], "bgp", 3) == 0) - type = ZEBRA_ROUTE_BGP; -+ else if (strncmp (argv[0], "h", 1) == 0) -+ type = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (argv[0], "o", 1) == 0) -+ type = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; - - ospf6_asbr_redistribute_unset (type); - ospf6_asbr_routemap_unset (type); -@@ -646,13 +655,16 @@ DEFUN (ospf6_redistribute, - - DEFUN (ospf6_redistribute_routemap, - ospf6_redistribute_routemap_cmd, -- "redistribute (static|kernel|connected|ripng|bgp) route-map WORD", -+ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman) route-map WORD", - "Redistribute\n" - "Static routes\n" - "Kernel route\n" - "Connected route\n" - "RIPng route\n" - "BGP route\n" -+ "HSLS route\n" -+ "OLSR route\n" -+ "BATMAN route\n" - "Route map reference\n" - "Route map name\n" - ) -@@ -669,6 +681,12 @@ DEFUN (ospf6_redistribute_routemap, - type = ZEBRA_ROUTE_RIPNG; - else if (strncmp (argv[0], "bgp", 3) == 0) - type = ZEBRA_ROUTE_BGP; -+ else if (strncmp (argv[0], "h", 1) == 0) -+ type = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (argv[0], "o", 1) == 0) -+ type = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; - - ospf6_asbr_redistribute_unset (type); - ospf6_asbr_routemap_set (type, argv[1]); -@@ -678,7 +696,7 @@ DEFUN (ospf6_redistribute_routemap, - - DEFUN (no_ospf6_redistribute, - no_ospf6_redistribute_cmd, -- "no redistribute (static|kernel|connected|ripng|bgp)", -+ "no redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", - NO_STR - "Redistribute\n" - "Static route\n" -@@ -686,6 +704,9 @@ DEFUN (no_ospf6_redistribute, - "Connected route\n" - "RIPng route\n" - "BGP route\n" -+ "HSLS route\n" -+ "OLSR route\n" -+ "BATMAN route\n" - ) - { - int type = 0; -@@ -700,6 +721,12 @@ DEFUN (no_ospf6_redistribute, - type = ZEBRA_ROUTE_RIPNG; - else if (strncmp (argv[0], "bgp", 3) == 0) - type = ZEBRA_ROUTE_BGP; -+ else if (strncmp (argv[0], "h", 1) == 0) -+ type = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (argv[0], "o", 1) == 0) -+ type = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; - - ospf6_asbr_redistribute_unset (type); - ospf6_asbr_routemap_unset (type); ---- a/ospfd/ospf_vty.c -+++ b/ospfd/ospf_vty.c -@@ -107,8 +107,14 @@ str2distribute_source (const char *str, - *source = ZEBRA_ROUTE_STATIC; - else if (strncmp (str, "r", 1) == 0) - *source = ZEBRA_ROUTE_RIP; -- else if (strncmp (str, "b", 1) == 0) -+ else if (strncmp (str, "bg", 2) == 0) - *source = ZEBRA_ROUTE_BGP; -+ else if (strncmp (str, "h", 1) == 0) -+ *source = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (str, "o", 1) == 0) -+ *source = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (str, "ba", 2) == 0) -+ *source = ZEBRA_ROUTE_BATMAN; - else - return 0; - ---- a/ripd/rip_zebra.c -+++ b/ripd/rip_zebra.c -@@ -204,8 +204,11 @@ static struct { - {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, - {ZEBRA_ROUTE_CONNECT, 1, "connected"}, - {ZEBRA_ROUTE_STATIC, 1, "static"}, -- {ZEBRA_ROUTE_OSPF, 1, "ospf"}, -- {ZEBRA_ROUTE_BGP, 1, "bgp"}, -+ {ZEBRA_ROUTE_OSPF, 2, "ospf"}, -+ {ZEBRA_ROUTE_BGP, 2, "bgp"}, -+ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, -+ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, -+ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, - {0, 0, NULL} - }; - ---- a/ripngd/ripng_zebra.c -+++ b/ripngd/ripng_zebra.c -@@ -214,8 +214,11 @@ static struct { - {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, - {ZEBRA_ROUTE_CONNECT, 1, "connected"}, - {ZEBRA_ROUTE_STATIC, 1, "static"}, -- {ZEBRA_ROUTE_OSPF6, 1, "ospf6"}, -- {ZEBRA_ROUTE_BGP, 1, "bgp"}, -+ {ZEBRA_ROUTE_OSPF6, 2, "ospf6"}, -+ {ZEBRA_ROUTE_BGP, 2, "bgp"}, -+ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, -+ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, -+ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, - {0, 0, NULL} - }; - ---- a/zebra/redistribute.c -+++ b/zebra/redistribute.c -@@ -255,6 +255,9 @@ zebra_redistribute_add (int command, str - case ZEBRA_ROUTE_OSPF: - case ZEBRA_ROUTE_OSPF6: - case ZEBRA_ROUTE_BGP: -+ case ZEBRA_ROUTE_HSLS: -+ case ZEBRA_ROUTE_OLSR: -+ case ZEBRA_ROUTE_BATMAN: - if (! client->redist[type]) - { - client->redist[type] = 1; -@@ -283,6 +286,9 @@ zebra_redistribute_delete (int command, - case ZEBRA_ROUTE_OSPF: - case ZEBRA_ROUTE_OSPF6: - case ZEBRA_ROUTE_BGP: -+ case ZEBRA_ROUTE_HSLS: -+ case ZEBRA_ROUTE_OLSR: -+ case ZEBRA_ROUTE_BATMAN: - client->redist[type] = 0; - break; - default: ---- a/zebra/zebra_rib.c -+++ b/zebra/zebra_rib.c -@@ -66,7 +66,10 @@ static const struct - {ZEBRA_ROUTE_OSPF, 110}, - {ZEBRA_ROUTE_OSPF6, 110}, - {ZEBRA_ROUTE_ISIS, 115}, -- {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */} -+ {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */}, -+ {ZEBRA_ROUTE_HSLS, 0}, -+ {ZEBRA_ROUTE_OLSR, 0}, -+ {ZEBRA_ROUTE_BATMAN, 0} - }; - - /* Vector for routing table. */ -@@ -1229,6 +1232,8 @@ static const u_char meta_queue_map[ZEBRA - [ZEBRA_ROUTE_ISIS] = 2, - [ZEBRA_ROUTE_BGP] = 3, - [ZEBRA_ROUTE_HSLS] = 4, -+ [ZEBRA_ROUTE_OLSR] = 4, -+ [ZEBRA_ROUTE_BATMAN] = 4, - }; - - /* Look into the RN and queue it into one or more priority queues, ---- a/zebra/zebra_snmp.c -+++ b/zebra/zebra_snmp.c -@@ -251,6 +251,12 @@ proto_trans(int type) - return 1; /* shouldn't happen */ - case ZEBRA_ROUTE_BGP: - return 14; /* bgp */ -+ case ZEBRA_ROUTE_HSLS: -+ return 1; /* other */ -+ case ZEBRA_ROUTE_OLSR: -+ return 1; /* other */ -+ case ZEBRA_ROUTE_BATMAN: -+ return 1; /* other */ - default: - return 1; /* other */ - } ---- a/zebra/zebra_vty.c -+++ b/zebra/zebra_vty.c -@@ -557,7 +557,10 @@ vty_show_ip_route_detail (struct vty *vt - if (rib->type == ZEBRA_ROUTE_RIP - || rib->type == ZEBRA_ROUTE_OSPF - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru - if (rib->type == ZEBRA_ROUTE_RIP - || rib->type == ZEBRA_ROUTE_OSPF - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -803,8 +809,8 @@ vty_show_ip_route (struct vty *vty, stru - } - - #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \ -- "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \ -- "> - selected route, * - FIB route%s%s" -+ "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \ -+ "o - OLSR, b - BATMAN,%s > - selected route, * - FIB route%s%s" - - DEFUN (show_ip_route, - show_ip_route_cmd, -@@ -829,7 +835,7 @@ DEFUN (show_ip_route, - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, VTY_NEWLINE, -- VTY_NEWLINE); -+ VTY_NEWLINE, VTY_NEWLINE); - first = 0; - } - vty_show_ip_route (vty, rn, rib); -@@ -872,7 +878,7 @@ DEFUN (show_ip_route_prefix_longer, - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, -- VTY_NEWLINE, VTY_NEWLINE); -+ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); - first = 0; - } - vty_show_ip_route (vty, rn, rib); -@@ -911,7 +917,7 @@ DEFUN (show_ip_route_supernets, - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, -- VTY_NEWLINE, VTY_NEWLINE); -+ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); - first = 0; - } - vty_show_ip_route (vty, rn, rib); -@@ -922,7 +928,7 @@ DEFUN (show_ip_route_supernets, - - DEFUN (show_ip_route_protocol, - show_ip_route_protocol_cmd, -- "show ip route (bgp|connected|isis|kernel|ospf|rip|static)", -+ "show ip route (bgp|connected|isis|kernel|ospf|rip|static|hsls|olsr|batman)", - SHOW_STR - IP_STR - "IP routing table\n" -@@ -940,13 +946,13 @@ DEFUN (show_ip_route_protocol, - struct rib *rib; - int first = 1; - -- if (strncmp (argv[0], "b", 1) == 0) -+ if (strncmp (argv[0], "bg", 2) == 0) - type = ZEBRA_ROUTE_BGP; - else if (strncmp (argv[0], "c", 1) == 0) - type = ZEBRA_ROUTE_CONNECT; - else if (strncmp (argv[0], "k", 1) ==0) - type = ZEBRA_ROUTE_KERNEL; -- else if (strncmp (argv[0], "o", 1) == 0) -+ else if (strncmp (argv[0], "os", 2) == 0) - type = ZEBRA_ROUTE_OSPF; - else if (strncmp (argv[0], "i", 1) == 0) - type = ZEBRA_ROUTE_ISIS; -@@ -954,6 +960,12 @@ DEFUN (show_ip_route_protocol, - type = ZEBRA_ROUTE_RIP; - else if (strncmp (argv[0], "s", 1) == 0) - type = ZEBRA_ROUTE_STATIC; -+ else if (strncmp (argv[0], "h", 1) == 0) -+ type = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (argv[0], "ol", 2) == 0) -+ type = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; - else - { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); -@@ -971,7 +983,7 @@ DEFUN (show_ip_route_protocol, - { - if (first) - { -- vty_out (vty, SHOW_ROUTE_V4_HEADER, -+ vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, - VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); - first = 0; - } -@@ -1560,7 +1572,10 @@ vty_show_ipv6_route_detail (struct vty * - if (rib->type == ZEBRA_ROUTE_RIPNG - || rib->type == ZEBRA_ROUTE_OSPF6 - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st - if (rib->type == ZEBRA_ROUTE_RIPNG - || rib->type == ZEBRA_ROUTE_OSPF6 - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -1766,7 +1784,7 @@ vty_show_ipv6_route (struct vty *vty, st - } - } - --#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, * - FIB route.%s%s" -+#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, H - HSLS, o - OLSR, b - BATMAN, * - FIB route.%s%s" - - DEFUN (show_ipv6_route, - show_ipv6_route_cmd, -@@ -1842,7 +1860,7 @@ DEFUN (show_ipv6_route_prefix_longer, - - DEFUN (show_ipv6_route_protocol, - show_ipv6_route_protocol_cmd, -- "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)", -+ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static|hsls|olsr|batman)", - SHOW_STR - IP_STR - "IP routing table\n" -@@ -1860,13 +1878,13 @@ DEFUN (show_ipv6_route_protocol, - struct rib *rib; - int first = 1; - -- if (strncmp (argv[0], "b", 1) == 0) -+ if (strncmp (argv[0], "bg", 2) == 0) - type = ZEBRA_ROUTE_BGP; - else if (strncmp (argv[0], "c", 1) == 0) - type = ZEBRA_ROUTE_CONNECT; - else if (strncmp (argv[0], "k", 1) ==0) - type = ZEBRA_ROUTE_KERNEL; -- else if (strncmp (argv[0], "o", 1) == 0) -+ else if (strncmp (argv[0], "os", 2) == 0) - type = ZEBRA_ROUTE_OSPF6; - else if (strncmp (argv[0], "i", 1) == 0) - type = ZEBRA_ROUTE_ISIS; -@@ -1874,6 +1892,12 @@ DEFUN (show_ipv6_route_protocol, - type = ZEBRA_ROUTE_RIPNG; - else if (strncmp (argv[0], "s", 1) == 0) - type = ZEBRA_ROUTE_STATIC; -+ else if (strncmp (argv[0], "h", 1) == 0) -+ type = ZEBRA_ROUTE_HSLS; -+ else if (strncmp (argv[0], "ol", 2) == 0) -+ type = ZEBRA_ROUTE_OLSR; -+ else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; - else - { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); diff --git a/net/quagga/Config.in b/net/quagga/Config.in new file mode 100644 index 000000000..7f29e3de9 --- /dev/null +++ b/net/quagga/Config.in @@ -0,0 +1,17 @@ +# Quagga configuration + +choice + prompt "Quagga version" + depends on PACKAGE_quagga + default QUAGGA_STABLE + help + This option allows you to select the version of Quagga to be built. + +config QUAGGA_STABLE + bool "Use the latest stable version of Quagga" + +config QUAGGA_OLD + depends BROKEN + bool "Use the old release version 0.98.6" + +endchoice diff --git a/net/quagga/Makefile b/net/quagga/Makefile index a2bf96379..e4a79c754 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -8,20 +8,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=quagga -PKG_VERSION:=0.98.6 -PKG_RELEASE:=5 -PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68 +ifneq ($(CONFIG_QUAGGA_OLD),) + PKG_VERSION:=0.98.6 + PKG_RELEASE:=5 + PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68 + PATCH_DIR:=./patches-old +else + PKG_VERSION:=0.99.17 + PKG_RELEASE:=1 + PKG_MD5SUM:=37b9022adca04b03863d2d79787e643f +endif +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:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - PKG_CONFIG_DEPENDS:= \ + CONFIG_QUAGGA_STABLE \ CONFIG_IPV6 \ CONFIG_PACKAGE_quagga-unstable-isisd \ CONFIG_PACKAGE_quagga-unstable-ripngd - +PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -38,7 +45,7 @@ endef define Package/quagga $(call Package/quagga/Default) - DEPENDS:= + DEPENDS:=+QUAGGA_STABLE:librt MENU:=1 endef @@ -48,6 +55,10 @@ define Package/quagga/description OSPFv3, BGP-4, and BGP-4+ endef +define Package/quagga/config + source "$(SOURCE)/Config.in" +endef + define Package/quagga-libzebra $(call Package/quagga/Default) TITLE:=zebra library @@ -60,7 +71,7 @@ endef define Package/quagga-bgpd $(call Package/quagga/Default) - DEPENDS += quagga-libzebra + DEPENDS+=+quagga-libzebra TITLE:=BGPv4, BGPv4+, BGPv4- routing engine endef @@ -71,31 +82,31 @@ endef define Package/quagga-ospfd $(call Package/quagga/Default) - DEPENDS += quagga-libospf quagga-libzebra + DEPENDS+=+quagga-libospf +quagga-libzebra TITLE:=OSPFv2 routing engine endef define Package/quagga-ospf6d $(call Package/quagga/Default) - DEPENDS += quagga-libospf quagga-libzebra @IPV6 + DEPENDS+=+quagga-libospf +quagga-libzebra @IPV6 TITLE:=OSPFv3 routing engine endef define Package/quagga-ripd $(call Package/quagga/Default) - DEPENDS += quagga-libzebra + DEPENDS+=+quagga-libzebra TITLE:=RIP routing engine endef define Package/quagga-ripngd $(call Package/quagga/Default) - DEPENDS += quagga-libzebra @BROKEN + DEPENDS+=+quagga-libzebra @BROKEN TITLE:=RIPNG routing engine endef define Package/quagga-vtysh $(call Package/quagga/Default) - DEPENDS += quagga-libzebra +libreadline +libncurses + DEPENDS+=quagga-libzebra +libreadline +libncurses TITLE:=integrated shell for Quagga routing software endef @@ -135,6 +146,7 @@ CONFIGURE_ARGS+= \ --enable-vtysh \ --enable-user=quagga \ --enable-group=quagga \ + --enable-pie=no \ --enable-multipath=8 \ ifneq ($(CONFIG_PACKAGE_quagga-isisd),) diff --git a/net/quagga/patches/001-quagga_cross.patch b/net/quagga/patches-old/001-quagga_cross.patch similarity index 100% rename from net/quagga/patches/001-quagga_cross.patch rename to net/quagga/patches-old/001-quagga_cross.patch diff --git a/net/quagga/patches/001-quagga_readline.patch b/net/quagga/patches-old/001-quagga_readline.patch similarity index 100% rename from net/quagga/patches/001-quagga_readline.patch rename to net/quagga/patches-old/001-quagga_readline.patch diff --git a/net/quagga/patches-old/002-quagga_manet.patch b/net/quagga/patches-old/002-quagga_manet.patch new file mode 100644 index 000000000..8fe07accc --- /dev/null +++ b/net/quagga/patches-old/002-quagga_manet.patch @@ -0,0 +1,855 @@ +--- a/bgpd/bgp_vty.c ++++ b/bgpd/bgp_vty.c +@@ -3,6 +3,9 @@ + + This file is part of GNU Zebra. + ++This file was modified from the original on 30/12/2007 ++by Vasilis Tsiligiannis ++ + GNU Zebra is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any +@@ -7793,8 +7796,12 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF; ++ else if (strncmp (str, "ba", 2) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + if (afi == AFI_IP6) + { +@@ -7806,21 +7813,28 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIPNG; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF6; ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "ba", 2) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + return 0; + } + + DEFUN (bgp_redistribute_ipv4, + bgp_redistribute_ipv4_cmd, +- "redistribute (connected|kernel|ospf|rip|static)", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -7835,13 +7849,15 @@ DEFUN (bgp_redistribute_ipv4, + + DEFUN (bgp_redistribute_ipv4_rmap, + bgp_redistribute_ipv4_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -7860,13 +7876,15 @@ DEFUN (bgp_redistribute_ipv4_rmap, + + DEFUN (bgp_redistribute_ipv4_metric, + bgp_redistribute_ipv4_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -7887,13 +7905,15 @@ DEFUN (bgp_redistribute_ipv4_metric, + + DEFUN (bgp_redistribute_ipv4_rmap_metric, + bgp_redistribute_ipv4_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -7917,13 +7937,15 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric + + DEFUN (bgp_redistribute_ipv4_metric_rmap, + bgp_redistribute_ipv4_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -7947,14 +7969,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap + + DEFUN (no_bgp_redistribute_ipv4, + no_bgp_redistribute_ipv4_cmd, +- "no redistribute (connected|kernel|ospf|rip|static)", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -7970,7 +7995,7 @@ DEFUN (no_bgp_redistribute_ipv4, + + DEFUN (no_bgp_redistribute_ipv4_rmap, + no_bgp_redistribute_ipv4_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -7978,6 +8003,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -7996,7 +8023,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + + DEFUN (no_bgp_redistribute_ipv4_metric, + no_bgp_redistribute_ipv4_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8004,6 +8031,8 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8022,7 +8051,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + + DEFUN (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8030,6 +8059,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8051,7 +8082,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + + ALIAS (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8059,6 +8090,8 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8067,13 +8100,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + #ifdef HAVE_IPV6 + DEFUN (bgp_redistribute_ipv6, + bgp_redistribute_ipv6_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static)", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -8089,13 +8125,15 @@ DEFUN (bgp_redistribute_ipv6, + + DEFUN (bgp_redistribute_ipv6_rmap, + bgp_redistribute_ipv6_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8114,13 +8152,15 @@ DEFUN (bgp_redistribute_ipv6_rmap, + + DEFUN (bgp_redistribute_ipv6_metric, + bgp_redistribute_ipv6_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8141,13 +8181,15 @@ DEFUN (bgp_redistribute_ipv6_metric, + + DEFUN (bgp_redistribute_ipv6_rmap_metric, + bgp_redistribute_ipv6_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8171,13 +8213,15 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric + + DEFUN (bgp_redistribute_ipv6_metric_rmap, + bgp_redistribute_ipv6_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8201,14 +8245,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap + + DEFUN (no_bgp_redistribute_ipv6, + no_bgp_redistribute_ipv6_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static)", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -8224,7 +8271,7 @@ DEFUN (no_bgp_redistribute_ipv6, + + DEFUN (no_bgp_redistribute_ipv6_rmap, + no_bgp_redistribute_ipv6_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8232,6 +8279,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8250,7 +8299,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + + DEFUN (no_bgp_redistribute_ipv6_metric, + no_bgp_redistribute_ipv6_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8258,6 +8307,8 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8276,7 +8327,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + + DEFUN (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8284,6 +8335,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8305,7 +8358,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + + ALIAS (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8313,6 +8366,8 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8325,7 +8380,7 @@ bgp_config_write_redistribute (struct vt + { + int i; + const char *str[] = { "system", "kernel", "connected", "static", "rip", +- "ripng", "ospf", "ospf6", "isis", "bgp"}; ++ "ripng", "ospf", "ospf6", "isis", "bgp", "hsls", "olsr", "batman"}; + + /* Unicast redistribution only. */ + if (safi != SAFI_UNICAST) +--- a/lib/zebra.h ++++ b/lib/zebra.h +@@ -3,6 +3,9 @@ + + This file is part of GNU Zebra. + ++This file was modified from the original on 30/12/2007 ++by Vasilis Tsiligiannis ++ + GNU Zebra is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any +@@ -378,7 +381,9 @@ struct in_pktinfo + #define ZEBRA_ROUTE_ISIS 8 + #define ZEBRA_ROUTE_BGP 9 + #define ZEBRA_ROUTE_HSLS 10 +-#define ZEBRA_ROUTE_MAX 11 ++#define ZEBRA_ROUTE_OLSR 11 ++#define ZEBRA_ROUTE_BATMAN 12 ++#define ZEBRA_ROUTE_MAX 13 + + /* Zebra's family types. */ + #define ZEBRA_FAMILY_IPV4 1 +--- a/ospfd/ospf_vty.c ++++ b/ospfd/ospf_vty.c +@@ -3,6 +3,9 @@ + * + * This file is part of GNU Zebra. + * ++ * This file was modified from the original on 30/12/2007 ++ * by Vasilis Tsiligiannis ++ * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any +@@ -106,11 +109,15 @@ str2distribute_source (const char *str, + *source = ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + *source = ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "b", 1) == 0) ++ else if (strncmp (str, "bg", 2) == 0) + *source = ZEBRA_ROUTE_BGP; ++ else if (strncmp (str, "ol", 2) == 0) ++ *source = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "ba", 2) == 0) ++ *source = ZEBRA_ROUTE_BATMAN; + else + return 0; +- ++ + return 1; + } + +@@ -5302,13 +5309,15 @@ ALIAS (no_ip_ospf_transmit_delay, + + DEFUN (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_type_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "OSPF exterior metric type for redistributed routes\n" +@@ -5346,13 +5355,15 @@ DEFUN (ospf_redistribute_source_metric_t + + ALIAS (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_type_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "OSPF exterior metric type for redistributed routes\n" +@@ -5361,25 +5372,29 @@ ALIAS (ospf_redistribute_source_metric_t + + ALIAS (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214>", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n") + + DEFUN (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_metric_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214> route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5417,13 +5432,15 @@ DEFUN (ospf_redistribute_source_type_met + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_metric_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214>", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5432,7 +5449,7 @@ ALIAS (ospf_redistribute_source_type_met + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" +@@ -5440,28 +5457,35 @@ ALIAS (ospf_redistribute_source_type_met + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" + "OSPF exterior metric type for redistributed routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n") + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_cmd, +- "redistribute (kernel|connected|static|rip|bgp)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + + DEFUN (ospf_redistribute_source_metric_routemap, + ospf_redistribute_source_metric_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "Route map reference\n" +@@ -5490,13 +5514,15 @@ DEFUN (ospf_redistribute_source_metric_r + + DEFUN (ospf_redistribute_source_type_routemap, + ospf_redistribute_source_type_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5526,13 +5552,15 @@ DEFUN (ospf_redistribute_source_type_rou + + DEFUN (ospf_redistribute_source_routemap, + ospf_redistribute_source_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -5553,14 +5581,17 @@ DEFUN (ospf_redistribute_source_routemap + + DEFUN (no_ospf_redistribute_source, + no_ospf_redistribute_source_cmd, +- "no redistribute (kernel|connected|static|rip|bgp)", ++ "no redistribute (kernel|connected|static|rip|bgp|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + struct ospf *ospf = vty->index; + int source; +@@ -5574,7 +5605,7 @@ DEFUN (no_ospf_redistribute_source, + + DEFUN (ospf_distribute_list_out, + ospf_distribute_list_out_cmd, +- "distribute-list WORD out (kernel|connected|static|rip|bgp)", ++ "distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", + "Filter networks in routing updates\n" + "Access-list name\n" + OUT_STR +@@ -5582,7 +5613,10 @@ DEFUN (ospf_distribute_list_out, + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++) + { + struct ospf *ospf = vty->index; + int source; +@@ -5596,7 +5630,7 @@ DEFUN (ospf_distribute_list_out, + + DEFUN (no_ospf_distribute_list_out, + no_ospf_distribute_list_out_cmd, +- "no distribute-list WORD out (kernel|connected|static|rip|bgp)", ++ "no distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", + NO_STR + "Filter networks in routing updates\n" + "Access-list name\n" +@@ -5605,7 +5639,10 @@ DEFUN (no_ospf_distribute_list_out, + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++) + { + struct ospf *ospf = vty->index; + int source; +@@ -7121,7 +7158,8 @@ config_write_virtual_link (struct vty *v + + + const char *distribute_str[] = { "system", "kernel", "connected", "static", +- "rip", "ripng", "ospf", "ospf6", "isis", "bgp"}; ++ "rip", "ripng", "ospf", "ospf6", "isis", "bgp", ++ "hsls","olsr","batman"}; + int + config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf) + { +--- a/zebra/redistribute.c ++++ b/zebra/redistribute.c +@@ -3,6 +3,9 @@ + * + * This file is part of GNU Zebra. + * ++ * This file was modified from the original on 30/12/2007 ++ * by Vasilis Tsiligiannis ++ * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any +@@ -253,6 +256,8 @@ zebra_redistribute_add (int command, str + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + if (! client->redist[type]) + { + client->redist[type] = 1; +@@ -281,6 +286,8 @@ zebra_redistribute_delete (int command, + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + client->redist[type] = 0; + break; + default: +--- a/zebra/zebra_vty.c ++++ b/zebra/zebra_vty.c +@@ -53,6 +53,10 @@ route_type_str (u_char type) + return "isis"; + case ZEBRA_ROUTE_BGP: + return "bgp"; ++ case ZEBRA_ROUTE_OLSR: ++ return "olsr"; ++ case ZEBRA_ROUTE_BATMAN: ++ return "batman"; + default: + return "unknown"; + } +@@ -84,6 +88,12 @@ route_type_char (u_char type) + return 'I'; + case ZEBRA_ROUTE_BGP: + return 'B'; ++ case ZEBRA_ROUTE_HSLS: ++ return 'H'; ++ case ZEBRA_ROUTE_OLSR: ++ return 'L'; ++ case ZEBRA_ROUTE_BATMAN: ++ return 'M'; + default: + return '?'; + } +@@ -755,8 +765,8 @@ vty_show_ip_route (struct vty *vty, stru + } + + #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \ +- "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \ +- "> - selected route, * - FIB route%s%s" ++ "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \ ++ "L - OLSR, M - BATMAN, > - selected route, * - FIB route%s%s" + + DEFUN (show_ip_route, + show_ip_route_cmd, +@@ -874,7 +884,7 @@ DEFUN (show_ip_route_supernets, + + DEFUN (show_ip_route_protocol, + show_ip_route_protocol_cmd, +- "show ip route (bgp|connected|isis|kernel|ospf|rip|static)", ++ "show ip route (bgp|connected|isis|kernel|ospf|rip|olsr|batman|static)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -884,6 +894,8 @@ DEFUN (show_ip_route_protocol, + "Kernel\n" + "Open Shortest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Static routes\n") + { + int type; +@@ -892,13 +904,13 @@ DEFUN (show_ip_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -906,6 +918,10 @@ DEFUN (show_ip_route_protocol, + type = ZEBRA_ROUTE_RIP; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); +@@ -1732,7 +1748,7 @@ DEFUN (show_ipv6_route_prefix_longer, + + DEFUN (show_ipv6_route_protocol, + show_ipv6_route_protocol_cmd, +- "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)", ++ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|olsr|batman|static)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -1742,6 +1758,8 @@ DEFUN (show_ipv6_route_protocol, + "Kernel\n" + "Open Shortest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Static routes\n") + { + int type; +@@ -1750,13 +1768,13 @@ DEFUN (show_ipv6_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF6; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -1764,7 +1782,11 @@ DEFUN (show_ipv6_route_protocol, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; +- else ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; ++ else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); + return CMD_WARNING; diff --git a/net/quagga/patches/100-confederation.patch b/net/quagga/patches-old/100-confederation.patch similarity index 100% rename from net/quagga/patches/100-confederation.patch rename to net/quagga/patches-old/100-confederation.patch diff --git a/net/quagga/patches/120-confed_errorhandle.patch b/net/quagga/patches-old/120-confed_errorhandle.patch similarity index 100% rename from net/quagga/patches/120-confed_errorhandle.patch rename to net/quagga/patches-old/120-confed_errorhandle.patch diff --git a/net/quagga/patches/130-netlink_ignore_wireless.patch b/net/quagga/patches-old/130-netlink_ignore_wireless.patch similarity index 100% rename from net/quagga/patches/130-netlink_ignore_wireless.patch rename to net/quagga/patches-old/130-netlink_ignore_wireless.patch diff --git a/net/quagga-unstable/patches/140-holdtimer-set.patch b/net/quagga/patches-old/140-holdtimer-set.patch similarity index 78% rename from net/quagga-unstable/patches/140-holdtimer-set.patch rename to net/quagga/patches-old/140-holdtimer-set.patch index 8642bbfc6..1264f5b72 100644 --- a/net/quagga-unstable/patches/140-holdtimer-set.patch +++ b/net/quagga/patches-old/140-holdtimer-set.patch @@ -1,18 +1,16 @@ --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c -@@ -188,8 +188,7 @@ bgp_accept (struct thread *thread) +@@ -109,6 +109,7 @@ bgp_accept (struct thread *thread) peer->fd = bgp_sock; peer->status = Active; peer->local_id = peer1->local_id; -- peer->v_holdtime = peer1->v_holdtime; -- peer->v_keepalive = peer1->v_keepalive; + peer->v_holdtime = BGP_LARGE_HOLDTIME; /* Make peer's address string. */ sockunion2str (&su, buf, SU_ADDRSTRLEN); --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h -@@ -709,6 +709,7 @@ struct bgp_nlri +@@ -656,6 +656,7 @@ struct bgp_nlri /* BGP timers default value. */ #define BGP_INIT_START_TIMER 5 #define BGP_ERROR_START_TIMER 30 diff --git a/net/quagga-unstable/patches/150-no-cross-fs-link.patch b/net/quagga/patches-old/150-no-cross-fs-link.patch similarity index 82% rename from net/quagga-unstable/patches/150-no-cross-fs-link.patch rename to net/quagga/patches-old/150-no-cross-fs-link.patch index c3f29c35f..1988f2e99 100644 --- a/net/quagga-unstable/patches/150-no-cross-fs-link.patch +++ b/net/quagga/patches-old/150-no-cross-fs-link.patch @@ -1,8 +1,8 @@ --- a/lib/command.c +++ b/lib/command.c -@@ -2601,6 +2601,13 @@ DEFUN (config_write_file, - VTY_NEWLINE); - goto finished; +@@ -2567,6 +2567,13 @@ + unlink (config_file_tmp); + return CMD_WARNING; } + +#if 0 @@ -14,9 +14,9 @@ if (link (config_file, config_file_sav) != 0) { vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, -@@ -2614,7 +2621,23 @@ DEFUN (config_write_file, - VTY_NEWLINE); - goto finished; +@@ -2586,7 +2593,23 @@ + unlink (config_file_tmp); + return CMD_WARNING; } +#else + /* And this is the code that hopefully does work */ @@ -24,7 +24,7 @@ + { + vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, + VTY_NEWLINE); -+ goto finished; ++ return CMD_WARNING; + } + sync (); +#endif diff --git a/net/quagga-unstable/patches/000-upstream-bogus_cond.patch b/net/quagga/patches/000-upstream-bogus_cond.patch similarity index 100% rename from net/quagga-unstable/patches/000-upstream-bogus_cond.patch rename to net/quagga/patches/000-upstream-bogus_cond.patch diff --git a/net/quagga-unstable/patches/000-upstream-miss_str.patch b/net/quagga/patches/000-upstream-miss_str.patch similarity index 100% rename from net/quagga-unstable/patches/000-upstream-miss_str.patch rename to net/quagga/patches/000-upstream-miss_str.patch diff --git a/net/quagga-unstable/patches/000-upstream-set_null.patch b/net/quagga/patches/000-upstream-set_null.patch similarity index 100% rename from net/quagga-unstable/patches/000-upstream-set_null.patch rename to net/quagga/patches/000-upstream-set_null.patch diff --git a/net/quagga-unstable/patches/001-fix_ipctl_forwarding.patch b/net/quagga/patches/001-fix_ipctl_forwarding.patch similarity index 100% rename from net/quagga-unstable/patches/001-fix_ipctl_forwarding.patch rename to net/quagga/patches/001-fix_ipctl_forwarding.patch diff --git a/net/quagga/patches/002-quagga_manet.patch b/net/quagga/patches/002-quagga_manet.patch index 8fe07accc..abbcd489f 100644 --- a/net/quagga/patches/002-quagga_manet.patch +++ b/net/quagga/patches/002-quagga_manet.patch @@ -1,39 +1,33 @@ --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c -@@ -3,6 +3,9 @@ - - This file is part of GNU Zebra. - -+This file was modified from the original on 30/12/2007 -+by Vasilis Tsiligiannis -+ - GNU Zebra is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any -@@ -7793,8 +7796,12 @@ bgp_str2route_type (int afi, const char +@@ -8228,8 +8228,14 @@ bgp_str2route_type (int afi, const char return ZEBRA_ROUTE_STATIC; else if (strncmp (str, "r", 1) == 0) return ZEBRA_ROUTE_RIP; - else if (strncmp (str, "o", 1) == 0) -+ else if (strncmp (str, "ol", 2) == 0) -+ return ZEBRA_ROUTE_OLSR; + else if (strncmp (str, "os", 2) == 0) return ZEBRA_ROUTE_OSPF; -+ else if (strncmp (str, "ba", 2) == 0) ++ else if (strncmp (str, "h", 1) == 0) ++ return ZEBRA_ROUTE_HSLS; ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "b", 1) == 0) + return ZEBRA_ROUTE_BATMAN; } if (afi == AFI_IP6) { -@@ -7806,21 +7813,28 @@ bgp_str2route_type (int afi, const char +@@ -8241,21 +8247,30 @@ bgp_str2route_type (int afi, const char return ZEBRA_ROUTE_STATIC; else if (strncmp (str, "r", 1) == 0) return ZEBRA_ROUTE_RIPNG; - else if (strncmp (str, "o", 1) == 0) + else if (strncmp (str, "os", 2) == 0) return ZEBRA_ROUTE_OSPF6; ++ else if (strncmp (str, "h", 1) == 0) ++ return ZEBRA_ROUTE_HSLS; + else if (strncmp (str, "ol", 2) == 0) + return ZEBRA_ROUTE_OLSR; -+ else if (strncmp (str, "ba", 2) == 0) ++ else if (strncmp (str, "b", 1) == 0) + return ZEBRA_ROUTE_BATMAN; } return 0; @@ -42,7 +36,7 @@ DEFUN (bgp_redistribute_ipv4, bgp_redistribute_ipv4_cmd, - "redistribute (connected|kernel|ospf|rip|static)", -+ "redistribute (connected|kernel|ospf|rip|static|olsr|batman)", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" @@ -50,86 +44,90 @@ "Routing Information Protocol (RIP)\n" - "Static routes\n") + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") { int type; -@@ -7835,13 +7849,15 @@ DEFUN (bgp_redistribute_ipv4, +@@ -8270,13 +8285,16 @@ DEFUN (bgp_redistribute_ipv4, DEFUN (bgp_redistribute_ipv4_rmap, bgp_redistribute_ipv4_rmap_cmd, - "redistribute (connected|kernel|ospf|rip|static) route-map WORD", -+ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n") { -@@ -7860,13 +7876,15 @@ DEFUN (bgp_redistribute_ipv4_rmap, +@@ -8295,13 +8313,16 @@ DEFUN (bgp_redistribute_ipv4_rmap, DEFUN (bgp_redistribute_ipv4_metric, bgp_redistribute_ipv4_metric_cmd, - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n") { -@@ -7887,13 +7905,15 @@ DEFUN (bgp_redistribute_ipv4_metric, +@@ -8322,13 +8343,16 @@ DEFUN (bgp_redistribute_ipv4_metric, DEFUN (bgp_redistribute_ipv4_rmap_metric, bgp_redistribute_ipv4_rmap_metric_cmd, - "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n" "Metric for redistributed routes\n" -@@ -7917,13 +7937,15 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric +@@ -8352,13 +8376,16 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric DEFUN (bgp_redistribute_ipv4_metric_rmap, bgp_redistribute_ipv4_metric_rmap_cmd, - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", -+ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n" "Route map reference\n" -@@ -7947,14 +7969,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap +@@ -8382,14 +8409,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap DEFUN (no_bgp_redistribute_ipv4, no_bgp_redistribute_ipv4_cmd, - "no redistribute (connected|kernel|ospf|rip|static)", -+ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman)", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" @@ -138,90 +136,94 @@ "Routing Information Protocol (RIP)\n" - "Static routes\n") + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") { int type; -@@ -7970,7 +7995,7 @@ DEFUN (no_bgp_redistribute_ipv4, +@@ -8405,7 +8435,7 @@ DEFUN (no_bgp_redistribute_ipv4, DEFUN (no_bgp_redistribute_ipv4_rmap, no_bgp_redistribute_ipv4_rmap_cmd, - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD", -+ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -7978,6 +8003,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, +@@ -8413,6 +8443,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n") { -@@ -7996,7 +8023,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, +@@ -8431,7 +8464,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, DEFUN (no_bgp_redistribute_ipv4_metric, no_bgp_redistribute_ipv4_metric_cmd, - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8004,6 +8031,8 @@ DEFUN (no_bgp_redistribute_ipv4_metric, +@@ -8439,6 +8472,9 @@ DEFUN (no_bgp_redistribute_ipv4_metric, "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n") { -@@ -8022,7 +8051,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, +@@ -8457,7 +8493,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, DEFUN (no_bgp_redistribute_ipv4_rmap_metric, no_bgp_redistribute_ipv4_rmap_metric_cmd, - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8030,6 +8059,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met +@@ -8465,6 +8501,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n" "Metric for redistributed routes\n" -@@ -8051,7 +8082,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met +@@ -8486,7 +8525,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met ALIAS (no_bgp_redistribute_ipv4_rmap_metric, no_bgp_redistribute_ipv4_metric_rmap_cmd, - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", -+ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8059,6 +8090,8 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met +@@ -8494,6 +8533,9 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met "Open Shurtest Path First (OSPF)\n" "Routing Information Protocol (RIP)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n" "Route map reference\n" -@@ -8067,13 +8100,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met +@@ -8502,13 +8544,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met #ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, bgp_redistribute_ipv6_cmd, - "redistribute (connected|kernel|ospf6|ripng|static)", -+ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" @@ -229,86 +231,90 @@ "Routing Information Protocol (RIPng)\n" - "Static routes\n") + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") { int type; -@@ -8089,13 +8125,15 @@ DEFUN (bgp_redistribute_ipv6, +@@ -8524,13 +8569,16 @@ DEFUN (bgp_redistribute_ipv6, DEFUN (bgp_redistribute_ipv6_rmap, bgp_redistribute_ipv6_rmap_cmd, - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", -+ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n") { -@@ -8114,13 +8152,15 @@ DEFUN (bgp_redistribute_ipv6_rmap, +@@ -8549,13 +8597,16 @@ DEFUN (bgp_redistribute_ipv6_rmap, DEFUN (bgp_redistribute_ipv6_metric, bgp_redistribute_ipv6_metric_cmd, - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n") { -@@ -8141,13 +8181,15 @@ DEFUN (bgp_redistribute_ipv6_metric, +@@ -8576,13 +8627,16 @@ DEFUN (bgp_redistribute_ipv6_metric, DEFUN (bgp_redistribute_ipv6_rmap_metric, bgp_redistribute_ipv6_rmap_metric_cmd, - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", -+ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n" "Metric for redistributed routes\n" -@@ -8171,13 +8213,15 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric +@@ -8606,13 +8660,16 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric DEFUN (bgp_redistribute_ipv6_metric_rmap, bgp_redistribute_ipv6_metric_rmap_cmd, - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", -+ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n" "Route map reference\n" -@@ -8201,14 +8245,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap +@@ -8636,14 +8693,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap DEFUN (no_bgp_redistribute_ipv6, no_bgp_redistribute_ipv6_cmd, - "no redistribute (connected|kernel|ospf6|ripng|static)", -+ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" @@ -317,106 +323,128 @@ "Routing Information Protocol (RIPng)\n" - "Static routes\n") + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") { int type; -@@ -8224,7 +8271,7 @@ DEFUN (no_bgp_redistribute_ipv6, +@@ -8659,7 +8719,7 @@ DEFUN (no_bgp_redistribute_ipv6, DEFUN (no_bgp_redistribute_ipv6_rmap, no_bgp_redistribute_ipv6_rmap_cmd, - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", -+ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8232,6 +8279,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, +@@ -8667,6 +8727,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n") { -@@ -8250,7 +8299,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, +@@ -8685,7 +8748,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, DEFUN (no_bgp_redistribute_ipv6_metric, no_bgp_redistribute_ipv6_metric_cmd, - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8258,6 +8307,8 @@ DEFUN (no_bgp_redistribute_ipv6_metric, +@@ -8693,6 +8756,9 @@ DEFUN (no_bgp_redistribute_ipv6_metric, "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n") { -@@ -8276,7 +8327,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, +@@ -8711,7 +8777,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, DEFUN (no_bgp_redistribute_ipv6_rmap_metric, no_bgp_redistribute_ipv6_rmap_metric_cmd, - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", -+ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8284,6 +8335,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met +@@ -8719,6 +8785,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Route map reference\n" "Pointer to route-map entries\n" "Metric for redistributed routes\n" -@@ -8305,7 +8358,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met +@@ -8740,7 +8809,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met ALIAS (no_bgp_redistribute_ipv6_rmap_metric, no_bgp_redistribute_ipv6_metric_rmap_cmd, - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", -+ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" -@@ -8313,6 +8366,8 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met +@@ -8748,6 +8817,9 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met "Open Shurtest Path First (OSPFv3)\n" "Routing Information Protocol (RIPng)\n" "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" + "Optimized Link State Routing (OLSR)\n" + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" "Metric for redistributed routes\n" "Default metric\n" "Route map reference\n" -@@ -8325,7 +8380,7 @@ bgp_config_write_redistribute (struct vt - { - int i; - const char *str[] = { "system", "kernel", "connected", "static", "rip", -- "ripng", "ospf", "ospf6", "isis", "bgp"}; -+ "ripng", "ospf", "ospf6", "isis", "bgp", "hsls", "olsr", "batman"}; - - /* Unicast redistribution only. */ - if (safi != SAFI_UNICAST) +--- a/lib/log.c ++++ b/lib/log.c +@@ -835,6 +835,8 @@ static const struct zebra_desc_table rou + DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ), + DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ), + DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ), ++ DESC_ENTRY (ZEBRA_ROUTE_OLSR, "olsr", 'o' ), ++ DESC_ENTRY (ZEBRA_ROUTE_BATMAN, "batman", 'b' ), + }; + #undef DESC_ENTRY + +--- a/lib/route_types.txt ++++ b/lib/route_types.txt +@@ -51,13 +51,9 @@ ZEBRA_ROUTE_OSPF, ospf, ospfd + ZEBRA_ROUTE_OSPF6, ospf6, ospf6d, 'O', 0, 1, "OSPF" + ZEBRA_ROUTE_ISIS, isis, isisd, 'I', 1, 1, "IS-IS" + ZEBRA_ROUTE_BGP, bgp, bgpd, 'B', 1, 1, "BGP" +-# HSLS and OLSR both are AFI independent (so: 1, 1), however +-# we want to disable for them for general Quagga distribution. +-# This at least makes it trivial for users of these protocols +-# to 'switch on' redist support (direct numeric entry remaining +-# possible). +-ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 0, 0, "HSLS" +-ZEBRA_ROUTE_OLSR, olsr, oslrd, 'o', 0, 0, "OLSR" ++ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 1, 1, "HSLS" ++ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 1, 1, "OLSR" ++ZEBRA_ROUTE_BATMAN, batman, batmand,'b', 1, 1, "BATMAN" + + ## help strings + ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" +@@ -71,4 +67,5 @@ ZEBRA_ROUTE_OSPF6, "Open Shortest Path + ZEBRA_ROUTE_ISIS, "Intermediate System to Intermediate System (IS-IS)" + ZEBRA_ROUTE_BGP, "Border Gateway Protocol (BGP)" + ZEBRA_ROUTE_HSLS, "Hazy-Sighted Link State Protocol (HSLS)" +-ZEBRA_ROUTE_OLSR, "Optimised Link State Routing (OLSR)" ++ZEBRA_ROUTE_OLSR, "Optimized Link State Routing (OLSR)" ++ZEBRA_ROUTE_BATMAN, "Better Approach to Mobile Ad-Hoc Networking (BATMAN)" --- a/lib/zebra.h +++ b/lib/zebra.h -@@ -3,6 +3,9 @@ - - This file is part of GNU Zebra. - -+This file was modified from the original on 30/12/2007 -+by Vasilis Tsiligiannis -+ - GNU Zebra is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any -@@ -378,7 +381,9 @@ struct in_pktinfo +@@ -441,7 +441,9 @@ struct in_pktinfo #define ZEBRA_ROUTE_ISIS 8 #define ZEBRA_ROUTE_BGP 9 #define ZEBRA_ROUTE_HSLS 10 @@ -425,361 +453,288 @@ +#define ZEBRA_ROUTE_BATMAN 12 +#define ZEBRA_ROUTE_MAX 13 - /* Zebra's family types. */ - #define ZEBRA_FAMILY_IPV4 1 + /* Note: whenever a new route-type or zserv-command is added the + * corresponding {command,route}_types[] table in lib/log.c MUST be +--- a/ospf6d/ospf6_asbr.c ++++ b/ospf6d/ospf6_asbr.c +@@ -616,13 +616,16 @@ ospf6_asbr_redistribute_remove (int type + + DEFUN (ospf6_redistribute, + ospf6_redistribute_cmd, +- "redistribute (static|kernel|connected|ripng|bgp)", ++ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", + "Redistribute\n" + "Static route\n" + "Kernel route\n" + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + ) + { + int type = 0; +@@ -637,6 +640,12 @@ DEFUN (ospf6_redistribute, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_unset (type); +@@ -646,13 +655,16 @@ DEFUN (ospf6_redistribute, + + DEFUN (ospf6_redistribute_routemap, + ospf6_redistribute_routemap_cmd, +- "redistribute (static|kernel|connected|ripng|bgp) route-map WORD", ++ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman) route-map WORD", + "Redistribute\n" + "Static routes\n" + "Kernel route\n" + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + "Route map reference\n" + "Route map name\n" + ) +@@ -669,6 +681,12 @@ DEFUN (ospf6_redistribute_routemap, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_set (type, argv[1]); +@@ -678,7 +696,7 @@ DEFUN (ospf6_redistribute_routemap, + + DEFUN (no_ospf6_redistribute, + no_ospf6_redistribute_cmd, +- "no redistribute (static|kernel|connected|ripng|bgp)", ++ "no redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", + NO_STR + "Redistribute\n" + "Static route\n" +@@ -686,6 +704,9 @@ DEFUN (no_ospf6_redistribute, + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + ) + { + int type = 0; +@@ -700,6 +721,12 @@ DEFUN (no_ospf6_redistribute, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_unset (type); --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c -@@ -3,6 +3,9 @@ - * - * This file is part of GNU Zebra. - * -+ * This file was modified from the original on 30/12/2007 -+ * by Vasilis Tsiligiannis -+ * - * GNU Zebra is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any -@@ -106,11 +109,15 @@ str2distribute_source (const char *str, +@@ -107,8 +107,14 @@ str2distribute_source (const char *str, *source = ZEBRA_ROUTE_STATIC; else if (strncmp (str, "r", 1) == 0) *source = ZEBRA_ROUTE_RIP; - else if (strncmp (str, "b", 1) == 0) + else if (strncmp (str, "bg", 2) == 0) *source = ZEBRA_ROUTE_BGP; -+ else if (strncmp (str, "ol", 2) == 0) ++ else if (strncmp (str, "h", 1) == 0) ++ *source = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (str, "o", 1) == 0) + *source = ZEBRA_ROUTE_OLSR; + else if (strncmp (str, "ba", 2) == 0) + *source = ZEBRA_ROUTE_BATMAN; else return 0; -- -+ - return 1; - } -@@ -5302,13 +5309,15 @@ ALIAS (no_ip_ospf_transmit_delay, - - DEFUN (ospf_redistribute_source_metric_type, - ospf_redistribute_source_metric_type_routemap_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2) route-map WORD", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2) route-map WORD", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "OSPF default metric\n" - "OSPF exterior metric type for redistributed routes\n" -@@ -5346,13 +5355,15 @@ DEFUN (ospf_redistribute_source_metric_t - - ALIAS (ospf_redistribute_source_metric_type, - ospf_redistribute_source_metric_type_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2)", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2)", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "OSPF default metric\n" - "OSPF exterior metric type for redistributed routes\n" -@@ -5361,25 +5372,29 @@ ALIAS (ospf_redistribute_source_metric_t - - ALIAS (ospf_redistribute_source_metric_type, - ospf_redistribute_source_metric_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214>", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "OSPF default metric\n") +--- a/ripd/rip_zebra.c ++++ b/ripd/rip_zebra.c +@@ -204,8 +204,11 @@ static struct { + {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, + {ZEBRA_ROUTE_CONNECT, 1, "connected"}, + {ZEBRA_ROUTE_STATIC, 1, "static"}, +- {ZEBRA_ROUTE_OSPF, 1, "ospf"}, +- {ZEBRA_ROUTE_BGP, 1, "bgp"}, ++ {ZEBRA_ROUTE_OSPF, 2, "ospf"}, ++ {ZEBRA_ROUTE_BGP, 2, "bgp"}, ++ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {0, 0, NULL} + }; + +--- a/ripngd/ripng_zebra.c ++++ b/ripngd/ripng_zebra.c +@@ -214,8 +214,11 @@ static struct { + {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, + {ZEBRA_ROUTE_CONNECT, 1, "connected"}, + {ZEBRA_ROUTE_STATIC, 1, "static"}, +- {ZEBRA_ROUTE_OSPF6, 1, "ospf6"}, +- {ZEBRA_ROUTE_BGP, 1, "bgp"}, ++ {ZEBRA_ROUTE_OSPF6, 2, "ospf6"}, ++ {ZEBRA_ROUTE_BGP, 2, "bgp"}, ++ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {0, 0, NULL} + }; - DEFUN (ospf_redistribute_source_type_metric, - ospf_redistribute_source_type_metric_routemap_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214> route-map WORD", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "OSPF exterior metric type for redistributed routes\n" - "Set OSPF External Type 1 metrics\n" - "Set OSPF External Type 2 metrics\n" -@@ -5417,13 +5432,15 @@ DEFUN (ospf_redistribute_source_type_met - - ALIAS (ospf_redistribute_source_type_metric, - ospf_redistribute_source_type_metric_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214>", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "OSPF exterior metric type for redistributed routes\n" - "Set OSPF External Type 1 metrics\n" - "Set OSPF External Type 2 metrics\n" -@@ -5432,7 +5449,7 @@ ALIAS (ospf_redistribute_source_type_met - - ALIAS (ospf_redistribute_source_type_metric, - ospf_redistribute_source_type_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2)", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" -@@ -5440,28 +5457,35 @@ ALIAS (ospf_redistribute_source_type_met - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" - "OSPF exterior metric type for redistributed routes\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Set OSPF External Type 1 metrics\n" - "Set OSPF External Type 2 metrics\n") - - ALIAS (ospf_redistribute_source_type_metric, - ospf_redistribute_source_cmd, -- "redistribute (kernel|connected|static|rip|bgp)", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman)", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" -- "Border Gateway Protocol (BGP)\n") -+ "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) - - DEFUN (ospf_redistribute_source_metric_routemap, - ospf_redistribute_source_metric_routemap_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> route-map WORD", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Metric for redistributed routes\n" - "OSPF default metric\n" - "Route map reference\n" -@@ -5490,13 +5514,15 @@ DEFUN (ospf_redistribute_source_metric_r - - DEFUN (ospf_redistribute_source_type_routemap, - ospf_redistribute_source_type_routemap_cmd, -- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) route-map WORD", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "OSPF exterior metric type for redistributed routes\n" - "Set OSPF External Type 1 metrics\n" - "Set OSPF External Type 2 metrics\n" -@@ -5526,13 +5552,15 @@ DEFUN (ospf_redistribute_source_type_rou - - DEFUN (ospf_redistribute_source_routemap, - ospf_redistribute_source_routemap_cmd, -- "redistribute (kernel|connected|static|rip|bgp) route-map WORD", -+ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) route-map WORD", - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" - "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Route map reference\n" - "Pointer to route-map entries\n") - { -@@ -5553,14 +5581,17 @@ DEFUN (ospf_redistribute_source_routemap - - DEFUN (no_ospf_redistribute_source, - no_ospf_redistribute_source_cmd, -- "no redistribute (kernel|connected|static|rip|bgp)", -+ "no redistribute (kernel|connected|static|rip|bgp|olsr|batman)", - NO_STR - "Redistribute information from another routing protocol\n" - "Kernel routes\n" - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" -- "Border Gateway Protocol (BGP)\n") -+ "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+ ) - { - struct ospf *ospf = vty->index; - int source; -@@ -5574,7 +5605,7 @@ DEFUN (no_ospf_redistribute_source, - - DEFUN (ospf_distribute_list_out, - ospf_distribute_list_out_cmd, -- "distribute-list WORD out (kernel|connected|static|rip|bgp)", -+ "distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", - "Filter networks in routing updates\n" - "Access-list name\n" - OUT_STR -@@ -5582,7 +5613,10 @@ DEFUN (ospf_distribute_list_out, - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" -- "Border Gateway Protocol (BGP)\n") -+ "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+) - { - struct ospf *ospf = vty->index; - int source; -@@ -5596,7 +5630,7 @@ DEFUN (ospf_distribute_list_out, - - DEFUN (no_ospf_distribute_list_out, - no_ospf_distribute_list_out_cmd, -- "no distribute-list WORD out (kernel|connected|static|rip|bgp)", -+ "no distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", - NO_STR - "Filter networks in routing updates\n" - "Access-list name\n" -@@ -5605,7 +5639,10 @@ DEFUN (no_ospf_distribute_list_out, - "Connected\n" - "Static routes\n" - "Routing Information Protocol (RIP)\n" -- "Border Gateway Protocol (BGP)\n") -+ "Border Gateway Protocol (BGP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" -+) - { - struct ospf *ospf = vty->index; - int source; -@@ -7121,7 +7158,8 @@ config_write_virtual_link (struct vty *v - - - const char *distribute_str[] = { "system", "kernel", "connected", "static", -- "rip", "ripng", "ospf", "ospf6", "isis", "bgp"}; -+ "rip", "ripng", "ospf", "ospf6", "isis", "bgp", -+ "hsls","olsr","batman"}; - int - config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf) - { --- a/zebra/redistribute.c +++ b/zebra/redistribute.c -@@ -3,6 +3,9 @@ - * - * This file is part of GNU Zebra. - * -+ * This file was modified from the original on 30/12/2007 -+ * by Vasilis Tsiligiannis -+ * - * GNU Zebra is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any -@@ -253,6 +256,8 @@ zebra_redistribute_add (int command, str +@@ -255,6 +255,9 @@ zebra_redistribute_add (int command, str case ZEBRA_ROUTE_OSPF: case ZEBRA_ROUTE_OSPF6: case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_HSLS: + case ZEBRA_ROUTE_OLSR: + case ZEBRA_ROUTE_BATMAN: if (! client->redist[type]) { client->redist[type] = 1; -@@ -281,6 +286,8 @@ zebra_redistribute_delete (int command, +@@ -283,6 +286,9 @@ zebra_redistribute_delete (int command, case ZEBRA_ROUTE_OSPF: case ZEBRA_ROUTE_OSPF6: case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_HSLS: + case ZEBRA_ROUTE_OLSR: + case ZEBRA_ROUTE_BATMAN: client->redist[type] = 0; break; default: ---- a/zebra/zebra_vty.c -+++ b/zebra/zebra_vty.c -@@ -53,6 +53,10 @@ route_type_str (u_char type) - return "isis"; - case ZEBRA_ROUTE_BGP: - return "bgp"; -+ case ZEBRA_ROUTE_OLSR: -+ return "olsr"; -+ case ZEBRA_ROUTE_BATMAN: -+ return "batman"; - default: - return "unknown"; - } -@@ -84,6 +88,12 @@ route_type_char (u_char type) - return 'I'; +--- a/zebra/zebra_rib.c ++++ b/zebra/zebra_rib.c +@@ -66,7 +66,10 @@ static const struct + {ZEBRA_ROUTE_OSPF, 110}, + {ZEBRA_ROUTE_OSPF6, 110}, + {ZEBRA_ROUTE_ISIS, 115}, +- {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */} ++ {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */}, ++ {ZEBRA_ROUTE_HSLS, 0}, ++ {ZEBRA_ROUTE_OLSR, 0}, ++ {ZEBRA_ROUTE_BATMAN, 0} + }; + + /* Vector for routing table. */ +@@ -1229,6 +1232,8 @@ static const u_char meta_queue_map[ZEBRA + [ZEBRA_ROUTE_ISIS] = 2, + [ZEBRA_ROUTE_BGP] = 3, + [ZEBRA_ROUTE_HSLS] = 4, ++ [ZEBRA_ROUTE_OLSR] = 4, ++ [ZEBRA_ROUTE_BATMAN] = 4, + }; + + /* Look into the RN and queue it into one or more priority queues, +--- a/zebra/zebra_snmp.c ++++ b/zebra/zebra_snmp.c +@@ -251,6 +251,12 @@ proto_trans(int type) + return 1; /* shouldn't happen */ case ZEBRA_ROUTE_BGP: - return 'B'; + return 14; /* bgp */ + case ZEBRA_ROUTE_HSLS: -+ return 'H'; ++ return 1; /* other */ + case ZEBRA_ROUTE_OLSR: -+ return 'L'; ++ return 1; /* other */ + case ZEBRA_ROUTE_BATMAN: -+ return 'M'; ++ return 1; /* other */ default: - return '?'; + return 1; /* other */ } -@@ -755,8 +765,8 @@ vty_show_ip_route (struct vty *vty, stru +--- a/zebra/zebra_vty.c ++++ b/zebra/zebra_vty.c +@@ -557,7 +557,10 @@ vty_show_ip_route_detail (struct vty *vt + if (rib->type == ZEBRA_ROUTE_RIP + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru + if (rib->type == ZEBRA_ROUTE_RIP + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -803,8 +809,8 @@ vty_show_ip_route (struct vty *vty, stru } #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \ - "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \ - "> - selected route, * - FIB route%s%s" + "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \ -+ "L - OLSR, M - BATMAN, > - selected route, * - FIB route%s%s" ++ "o - OLSR, b - BATMAN,%s > - selected route, * - FIB route%s%s" DEFUN (show_ip_route, show_ip_route_cmd, -@@ -874,7 +884,7 @@ DEFUN (show_ip_route_supernets, +@@ -829,7 +835,7 @@ DEFUN (show_ip_route, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, VTY_NEWLINE, +- VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -872,7 +878,7 @@ DEFUN (show_ip_route_prefix_longer, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, +- VTY_NEWLINE, VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -911,7 +917,7 @@ DEFUN (show_ip_route_supernets, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, +- VTY_NEWLINE, VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -922,7 +928,7 @@ DEFUN (show_ip_route_supernets, DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, - "show ip route (bgp|connected|isis|kernel|ospf|rip|static)", -+ "show ip route (bgp|connected|isis|kernel|ospf|rip|olsr|batman|static)", ++ "show ip route (bgp|connected|isis|kernel|ospf|rip|static|hsls|olsr|batman)", SHOW_STR IP_STR "IP routing table\n" -@@ -884,6 +894,8 @@ DEFUN (show_ip_route_protocol, - "Kernel\n" - "Open Shortest Path First (OSPF)\n" - "Routing Information Protocol (RIP)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Static routes\n") - { - int type; -@@ -892,13 +904,13 @@ DEFUN (show_ip_route_protocol, +@@ -940,13 +946,13 @@ DEFUN (show_ip_route_protocol, struct rib *rib; int first = 1; @@ -795,10 +750,12 @@ type = ZEBRA_ROUTE_OSPF; else if (strncmp (argv[0], "i", 1) == 0) type = ZEBRA_ROUTE_ISIS; -@@ -906,6 +918,10 @@ DEFUN (show_ip_route_protocol, +@@ -954,6 +960,12 @@ DEFUN (show_ip_route_protocol, type = ZEBRA_ROUTE_RIP; else if (strncmp (argv[0], "s", 1) == 0) type = ZEBRA_ROUTE_STATIC; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; + else if (strncmp (argv[0], "ol", 2) == 0) + type = ZEBRA_ROUTE_OLSR; + else if (strncmp (argv[0], "ba", 2) == 0) @@ -806,25 +763,58 @@ else { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); -@@ -1732,7 +1748,7 @@ DEFUN (show_ipv6_route_prefix_longer, +@@ -971,7 +983,7 @@ DEFUN (show_ip_route_protocol, + { + if (first) + { +- vty_out (vty, SHOW_ROUTE_V4_HEADER, ++ vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, + VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } +@@ -1560,7 +1572,10 @@ vty_show_ipv6_route_detail (struct vty * + if (rib->type == ZEBRA_ROUTE_RIPNG + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st + if (rib->type == ZEBRA_ROUTE_RIPNG + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -1766,7 +1784,7 @@ vty_show_ipv6_route (struct vty *vty, st + } + } + +-#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, * - FIB route.%s%s" ++#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, H - HSLS, o - OLSR, b - BATMAN, * - FIB route.%s%s" + + DEFUN (show_ipv6_route, + show_ipv6_route_cmd, +@@ -1842,7 +1860,7 @@ DEFUN (show_ipv6_route_prefix_longer, DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, - "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)", -+ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|olsr|batman|static)", ++ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static|hsls|olsr|batman)", SHOW_STR IP_STR "IP routing table\n" -@@ -1742,6 +1758,8 @@ DEFUN (show_ipv6_route_protocol, - "Kernel\n" - "Open Shortest Path First (OSPFv3)\n" - "Routing Information Protocol (RIPng)\n" -+ "Optimized Link State Routing (OLSR)\n" -+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" - "Static routes\n") - { - int type; -@@ -1750,13 +1768,13 @@ DEFUN (show_ipv6_route_protocol, +@@ -1860,13 +1878,13 @@ DEFUN (show_ipv6_route_protocol, struct rib *rib; int first = 1; @@ -840,16 +830,16 @@ type = ZEBRA_ROUTE_OSPF6; else if (strncmp (argv[0], "i", 1) == 0) type = ZEBRA_ROUTE_ISIS; -@@ -1764,7 +1782,11 @@ DEFUN (show_ipv6_route_protocol, +@@ -1874,6 +1892,12 @@ DEFUN (show_ipv6_route_protocol, type = ZEBRA_ROUTE_RIPNG; else if (strncmp (argv[0], "s", 1) == 0) type = ZEBRA_ROUTE_STATIC; -- else ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; + else if (strncmp (argv[0], "ol", 2) == 0) -+ type = ZEBRA_ROUTE_OLSR; ++ type = ZEBRA_ROUTE_OLSR; + else if (strncmp (argv[0], "ba", 2) == 0) -+ type = ZEBRA_ROUTE_BATMAN; -+ else ++ type = ZEBRA_ROUTE_BATMAN; + else { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); - return CMD_WARNING; diff --git a/net/quagga-unstable/patches/010-fix_cpp.patch b/net/quagga/patches/010-fix_cpp.patch similarity index 100% rename from net/quagga-unstable/patches/010-fix_cpp.patch rename to net/quagga/patches/010-fix_cpp.patch diff --git a/net/quagga-unstable/patches/100-quagga_multipath_caching_policy.patch b/net/quagga/patches/100-quagga_multipath_caching_policy.patch similarity index 100% rename from net/quagga-unstable/patches/100-quagga_multipath_caching_policy.patch rename to net/quagga/patches/100-quagga_multipath_caching_policy.patch diff --git a/net/quagga/patches/140-holdtimer-set.patch b/net/quagga/patches/140-holdtimer-set.patch index 1264f5b72..8642bbfc6 100644 --- a/net/quagga/patches/140-holdtimer-set.patch +++ b/net/quagga/patches/140-holdtimer-set.patch @@ -1,16 +1,18 @@ --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c -@@ -109,6 +109,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; +- peer->v_holdtime = peer1->v_holdtime; +- peer->v_keepalive = peer1->v_keepalive; + peer->v_holdtime = BGP_LARGE_HOLDTIME; /* Make peer's address string. */ sockunion2str (&su, buf, SU_ADDRSTRLEN); --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h -@@ -656,6 +656,7 @@ struct bgp_nlri +@@ -709,6 +709,7 @@ struct bgp_nlri /* BGP timers default value. */ #define BGP_INIT_START_TIMER 5 #define BGP_ERROR_START_TIMER 30 diff --git a/net/quagga/patches/150-no-cross-fs-link.patch b/net/quagga/patches/150-no-cross-fs-link.patch index 1988f2e99..c3f29c35f 100644 --- a/net/quagga/patches/150-no-cross-fs-link.patch +++ b/net/quagga/patches/150-no-cross-fs-link.patch @@ -1,8 +1,8 @@ --- a/lib/command.c +++ b/lib/command.c -@@ -2567,6 +2567,13 @@ - unlink (config_file_tmp); - return CMD_WARNING; +@@ -2601,6 +2601,13 @@ DEFUN (config_write_file, + VTY_NEWLINE); + goto finished; } + +#if 0 @@ -14,9 +14,9 @@ if (link (config_file, config_file_sav) != 0) { vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, -@@ -2586,7 +2593,23 @@ - unlink (config_file_tmp); - return CMD_WARNING; +@@ -2614,7 +2621,23 @@ DEFUN (config_write_file, + VTY_NEWLINE); + goto finished; } +#else + /* And this is the code that hopefully does work */ @@ -24,7 +24,7 @@ + { + vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, + VTY_NEWLINE); -+ return CMD_WARNING; ++ goto finished; + } + sync (); +#endif -- 2.30.2