summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/quagga
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-protocols/quagga
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-protocols/quagga')
-rw-r--r--meta-networking/recipes-protocols/quagga/files/0001-doc-fix-makeinfo-errors-and-one-warning.patch61
-rw-r--r--meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch48
-rw-r--r--meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch50
-rw-r--r--meta-networking/recipes-protocols/quagga/files/build-fix-extract.pl-for-cross-compilation.patch31
-rw-r--r--meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch19
-rw-r--r--meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch64
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch64
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch54
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga-fix-CVE-2013-6051.patch29
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.default13
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.init200
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.pam13
-rw-r--r--meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch50
-rw-r--r--meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga3
-rw-r--r--meta-networking/recipes-protocols/quagga/files/watchquagga.default12
-rw-r--r--meta-networking/recipes-protocols/quagga/files/watchquagga.init64
-rw-r--r--meta-networking/recipes-protocols/quagga/files/work-with-new-readline.patch34
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga.inc207
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb15
19 files changed, 1031 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/quagga/files/0001-doc-fix-makeinfo-errors-and-one-warning.patch b/meta-networking/recipes-protocols/quagga/files/0001-doc-fix-makeinfo-errors-and-one-warning.patch
new file mode 100644
index 0000000000..24fdac505a
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/0001-doc-fix-makeinfo-errors-and-one-warning.patch
@@ -0,0 +1,61 @@
1From d6cbd8bbc34529a1aff74b5ee73366b89526c961 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe@deserted.net>
3Date: Fri, 22 Mar 2013 08:54:44 +0000
4Subject: [PATCH] doc: fix makeinfo errors and one warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 4afa50b added few lines that are syntactically incorrect
10with leading plus sign.
11
12Upstream-Status: Backport [http://git.savannah.gnu.org/gitweb/?p=quagga.git;a=commit;h=b58c90807c9d0bfa9601704c7490a16070906004]
13
14Cc: Denis Ovsienko <infrastation@yandex.ru>
15Signed-off-by: Timo Teräs <timo.teras@iki.fi>
16Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
17Signed-off-by: Joe MacDonald <joe@deserted.net>
18---
19 doc/ipv6.texi | 4 ++--
20 doc/quagga.texi | 6 +++---
21 2 files changed, 5 insertions(+), 5 deletions(-)
22
23diff --git a/doc/ipv6.texi b/doc/ipv6.texi
24index b6cc437..2482c1c 100644
25--- a/doc/ipv6.texi
26+++ b/doc/ipv6.texi
27@@ -136,8 +136,8 @@ for the lowest preference possible.
28 Default: 0
29 @end deffn
30
31-+@deffn {Interface Command} {ipv6 nd home-agent-lifetime <0-65520>} {}
32-+@deffnx {Interface Command} {no ipv6 nd home-agent-lifetime [<0-65520>]} {}
33+@deffn {Interface Command} {ipv6 nd home-agent-lifetime <0-65520>} {}
34+@deffnx {Interface Command} {no ipv6 nd home-agent-lifetime [<0-65520>]} {}
35 The value to be placed in Home Agent Option, when Home Agent config flag is set,
36 which indicates to hosts Home Agent Lifetime. The default value of 0 means to
37 place the current Router Lifetime value.
38diff --git a/doc/quagga.texi b/doc/quagga.texi
39index ff913aa..b4105ac 100644
40--- a/doc/quagga.texi
41+++ b/doc/quagga.texi
42@@ -1,13 +1,13 @@
43 \input texinfo @c -*- texinfo -*-
44+@c Set variables - sourced from defines.texi
45+@include defines.texi
46+
47 @c %**start of header
48 @setchapternewpage odd
49 @settitle @uref{http://www.quagga.net,,@value{PACKAGE_NAME}}
50 @setfilename quagga.info
51 @c %**end of header
52
53-@c Set variables - sourced from defines.texi
54-@include defines.texi
55-
56 @c automake will automatically generate version.texi
57 @c and set EDITION, VERSION, UPDATED and UPDATED-MONTH
58 @include version.texi
59--
601.7.10.4
61
diff --git a/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch b/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
new file mode 100644
index 0000000000..35f4637d8e
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
@@ -0,0 +1,48 @@
1sync zebra routing table with the kernel one when interface is down
2
3Add router to kernel main router table with "ip", then you can see
4a router item in kernel main router table. Also can see this router
5item in zebra router table. If down the interface, this router item
6will be deleted from kernel main router table, but it will not be
7deleted from zebra router table, just set as inactive.
8
9This patch is adopted from [1].
10[1] http://www.gossamer-threads.com/lists/quagga/dev/22609
11
12Upstream-Status: Pending
13
14Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
15Signed-of-by: Roy.Li <rongqing.li@windriver.com>
16
17---
18 zebra/zebra_rib.c | 7 +++++++
19 1 files changed, 7 insertions(+), 0 deletions(-)
20
21diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
22index 154e8d5..63434d0 100644
23--- a/zebra/zebra_rib.c
24+++ b/zebra/zebra_rib.c
25@@ -765,6 +765,9 @@ rib_match_ipv6 (struct in6_addr *addr)
26 #define RIB_SYSTEM_ROUTE(R) \
27 ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
28
29+#define RIB_KERNEL_ROUTE(R) \
30+ ((R)->type == ZEBRA_ROUTE_KERNEL)
31+
32 /* This function verifies reachability of one given nexthop, which can be
33 * numbered or unnumbered, IPv4 or IPv6. The result is unconditionally stored
34 * in nexthop->flags field. If the 4th parameter, 'set', is non-zero,
35@@ -1135,6 +1138,10 @@ rib_process (struct route_node *rn)
36 redistribute_delete (&rn->p, fib);
37 if (! RIB_SYSTEM_ROUTE (fib))
38 rib_uninstall_kernel (rn, fib);
39+#ifdef GNU_LINUX
40+ else if(RIB_KERNEL_ROUTE (fib) && !if_is_up(if_lookup_by_index(fib->nexthop->ifindex)))
41+ del=fib;
42+#endif
43 UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED);
44
45 /* Set real nexthop. */
46--
471.7.4.1
48
diff --git a/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch b/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch
new file mode 100644
index 0000000000..c2757a2fb7
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/babel-close-the-stdout-stderr-as-in-other-daemons.patch
@@ -0,0 +1,50 @@
1From ba71f768e6dbb1f2ac72ed3bd880bff75a48d345 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Wed, 19 Feb 2014 14:13:40 +0800
4Subject: [PATCH] babeld: close stdout once the background daemon is created
5
6Upstream-Status: pending
7
8Once babald becomes a background daemon, it should not output information to
9stdout, so need to close stdout.
10
11In fact, other daemons close their stdout when they run into background, like
12ospfd, isisd and bgpd, by calling daemon() which is in lib/daemon.c
13
14Closing the stdout can fix a tee hang issue { #/usr/sbin/babeld -d |tee tmp }
15
16Signed-off-by: Roy Li <rongqing.li@windriver.com>
17---
18 babeld/util.c | 10 +++++++++-
19 1 file changed, 9 insertions(+), 1 deletion(-)
20
21diff --git a/babeld/util.c b/babeld/util.c
22index 011f382..76203bc 100644
23--- a/babeld/util.c
24+++ b/babeld/util.c
25@@ -425,7 +425,7 @@ uchar_to_in6addr(struct in6_addr *dest, const unsigned char *src)
26 int
27 daemonise()
28 {
29- int rc;
30+ int rc, fd;
31
32 fflush(stdout);
33 fflush(stderr);
34@@ -441,5 +441,13 @@ daemonise()
35 if(rc < 0)
36 return -1;
37
38+ fd = open("/dev/null", O_RDWR, 0);
39+ if (fd != -1)
40+ {
41+ dup2(fd, STDOUT_FILENO);
42+ if (fd > 2)
43+ close(fd);
44+ }
45+
46 return 1;
47 }
48--
491.7.10.4
50
diff --git a/meta-networking/recipes-protocols/quagga/files/build-fix-extract.pl-for-cross-compilation.patch b/meta-networking/recipes-protocols/quagga/files/build-fix-extract.pl-for-cross-compilation.patch
new file mode 100644
index 0000000000..7e5beef30d
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/build-fix-extract.pl-for-cross-compilation.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Backport
2
3From ed6e297972318a0070ad4d973401fbc6e0def558 Mon Sep 17 00:00:00 2001
4From: Serj Kalichev <serj.kalichev@gmail.com>
5Date: Fri, 7 Sep 2012 13:29:42 +0400
6Subject: [PATCH] build: fix extract.pl for cross compilation
7
8extract.pl should invoke the C preprocessor for the target system, not the
9host.
10
11* vtysh/extract.pl.in: use @CPP@ to get target cpp
12---
13 vtysh/extract.pl.in | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
17index 7612aff..4c3a47f 100755
18--- a/vtysh/extract.pl.in
19+++ b/vtysh/extract.pl.in
20@@ -63,7 +63,7 @@ $ignore{'"show history"'} = "ignore";
21 foreach (@ARGV) {
22 $file = $_;
23
24- open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ @CPPFLAGS@ $file |");
25+ open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ @CPPFLAGS@ $file |");
26 local $/; undef $/;
27 $line = <FH>;
28 close (FH);
29--
301.7.1
31
diff --git a/meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch b/meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch
new file mode 100644
index 0000000000..50f0ad502f
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch
@@ -0,0 +1,19 @@
1At first this worked, then I tried a clean build in a directory that
2contained lib in it (oe/build/titan-glibc) and vtysh no longer
3worked. It's test for the lib directory was excepting anything
4containing lib.
5
6With this patch you still cannot have lib in the path anywhere, but
7at least things containing lib will now work.
8
9--- quagga-0.99.2/vtysh/extract.pl.in 2005/11/16 04:12:04 1.1
10+++ quagga-0.99.2/vtysh/extract.pl.in 2005/11/16 04:12:16
11@@ -89,7 +89,7 @@
12 $cmd =~ s/\s+$//g;
13
14 # $protocol is VTYSH_PROTO format for redirection of user input
15- if ($file =~ /lib/) {
16+ if ($file =~ /\/lib\//) {
17 if ($file =~ /keychain.c/) {
18 $protocol = "VTYSH_RIPD";
19 }
diff --git a/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch b/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch
new file mode 100644
index 0000000000..42bdc20fcb
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch
@@ -0,0 +1,64 @@
1From 7f062c217b262e362a3362c677dea6c5e820adf1 Mon Sep 17 00:00:00 2001
2From: David Lamparter <equinox@diac24.net>
3Date: Mon, 1 Feb 2010 16:41:26 +0100
4Subject: [PATCH] zebra: lingering IP address after deletion (BZ#486)
5
6Upstream-status: Backport
7
8zebra address bookkeeping is a mess. this is just a workaround to have
9IPv4 address deletion somewhat working on Linux.
10
11the if_unset_prefix call is synchronous, when it returns success the
12address deletion completed successfully. this is either signaled by a
13netlink ACK or by an OK return value from ioctl().
14
15This version is wrapped by #ifdef HAVE_NETLINK so we don't touch the
16BSDs for now.
17
18* zebra/interface.c: On Linux, update zebra internal state after
19 deleting an address.
20
21Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
22---
23 zebra/interface.c | 21 ++++++++++++++++++---
24 1 file changed, 18 insertions(+), 3 deletions(-)
25
26diff --git a/zebra/interface.c b/zebra/interface.c
27index 2242259..3578b79 100644
28--- a/zebra/interface.c
29+++ b/zebra/interface.c
30@@ -1297,13 +1297,28 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp,
31 safe_strerror(errno), VTY_NEWLINE);
32 return CMD_WARNING;
33 }
34+ /* success! call returned that the address deletion went through.
35+ * this is a synchronous operation, so we know it succeeded and can
36+ * now update all internal state. */
37+
38+ /* the HAVE_NETLINK check is only here because, on BSD, although the
39+ * call above is still synchronous, we get a second confirmation later
40+ * through the route socket, and we don't want to touch that behaviour
41+ * for now. It should work without the #ifdef, but why take the risk...
42+ * -- equinox 2012-07-13 */
43+#ifdef HAVE_NETLINK
44+
45+ /* Remove connected route. */
46+ connected_down_ipv4 (ifp, ifc);
47
48-#if 0
49 /* Redistribute this information. */
50 zebra_interface_address_delete_update (ifp, ifc);
51
52- /* Remove connected route. */
53- connected_down_ipv4 (ifp, ifc);
54+ /* IP address propery set. */
55+ UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL);
56+
57+ /* remove from interface, remark secondaries */
58+ if_subnet_delete (ifp, ifc);
59
60 /* Free address information. */
61 listnode_delete (ifp->connected, ifc);
62--
631.7.10.4
64
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch b/meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch
new file mode 100644
index 0000000000..9563ea2f36
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch
@@ -0,0 +1,64 @@
1From 63e97633d01908da6d3776ac61e4033e6fa91e5c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
3Date: Sun, 5 Sep 2010 18:19:09 +0200
4Subject: [PATCH] build: fix linking position for libcap
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9 * lib/Makefile.am: link libzebra to libcap, since it uses symbols
10 from there.
11 * zebra/Makefile.am: no need to link libcap here now, since it's not
12 used directly (libtool with apply transitive dependencies for
13 static linking).
14
15Signed-off-by: Diego Elio PettenĂ² <flameeyes@gmail.com>
16
17Imported from Gentoo by Paul Eggleton <paul.eggleton@linux.intel.com>
18Upstream-Status: Pending
19
20---
21 lib/Makefile.am | 2 +-
22 zebra/Makefile.am | 5 ++---
23 2 files changed, 3 insertions(+), 4 deletions(-)
24
25diff --git a/lib/Makefile.am b/lib/Makefile.am
26index 315e919..6e69993 100644
27--- a/lib/Makefile.am
28+++ b/lib/Makefile.am
29@@ -18,7 +18,7 @@ BUILT_SOURCES = memtypes.h route_types.h
30
31 libzebra_la_DEPENDENCIES = @LIB_REGEX@
32
33-libzebra_la_LIBADD = @LIB_REGEX@
34+libzebra_la_LIBADD = @LIB_REGEX@ $(LIBCAP)
35
36 pkginclude_HEADERS = \
37 buffer.h checksum.h command.h filter.h getopt.h hash.h \
38diff --git a/zebra/Makefile.am b/zebra/Makefile.am
39index 542f36f..d09a209 100644
40--- a/zebra/Makefile.am
41+++ b/zebra/Makefile.am
42@@ -5,7 +5,6 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@
43 INSTALL_SDATA=@INSTALL@ -m 600
44
45 LIB_IPV6 = @LIB_IPV6@
46-LIBCAP = @LIBCAP@
47
48 ipforward = @IPFORWARD@
49 if_method = @IF_METHOD@
50@@ -39,9 +38,9 @@ noinst_HEADERS = \
51 connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
52 interface.h ipforward.h irdp.h router-id.h kernel_socket.h
53
54-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
55+zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIB_IPV6)
56
57-testzebra_LDADD = $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
58+testzebra_LDADD = ../lib/libzebra.la $(LIB_IPV6)
59
60 zebra_DEPENDENCIES = $(otherobj)
61
62--
631.7.2.2
64
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch b/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch
new file mode 100644
index 0000000000..a07e33f9fd
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga-Avoid-duplicate-connected-address.patch
@@ -0,0 +1,54 @@
1quagga: Avoid duplicate connected address adding to the list
2
3commit 27ba970b9("quagga/ripd: Fix two bugs after received SIGHUP signal")
4introduces an regression: ifp->connected list is cleaned up when ripd is
5restarting, however, for interface addresses which are not specified in
6ripd configuration file, they are never to be added into ifp->connected
7again, this will lead to some abnormal behavior for route advertising.
8
9Instead of cleaning up the ifp->connected list to avoid duplicated
10connected address being added into this list, we can check this
11condition during interface address adding process and return early
12when an identical address has already been added.
13
14Upstream-Status: Pending
15
16Signed-off-by: Hu Yadi <Yadi.hu@windriver.com>
17Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
18Signed-off-by: Joe MacDonald <joe@deserted.net>
19---
20--- a/lib/if.c
21+++ b/lib/if.c
22@@ -738,6 +738,16 @@ connected_add_by_prefix (struct interfac
23 struct prefix *destination)
24 {
25 struct connected *ifc;
26+ struct listnode *cnode;
27+ struct connected *c;
28+ int ret = 0;
29+
30+ for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, c))
31+ {
32+ ret = connected_same_prefix (p, (c->address));
33+ if(ret == 1)
34+ return NULL;
35+ }
36
37 /* Allocate new connected address. */
38 ifc = connected_new ();
39--- a/ripd/rip_interface.c
40+++ b/ripd/rip_interface.c
41@@ -516,13 +516,6 @@ rip_interface_clean (void)
42 thread_cancel (ri->t_wakeup);
43 ri->t_wakeup = NULL;
44 }
45-
46- for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
47- {
48- ifc = listgetdata (conn_node);
49- next = conn_node->next;
50- listnode_delete (ifp->connected, ifc);
51- }
52 }
53 }
54
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga-fix-CVE-2013-6051.patch b/meta-networking/recipes-protocols/quagga/files/quagga-fix-CVE-2013-6051.patch
new file mode 100644
index 0000000000..fde9e0ca81
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga-fix-CVE-2013-6051.patch
@@ -0,0 +1,29 @@
1
2From 8794e8d229dc9fe29ea31424883433d4880ef408
3From: Paul Jakma <paul@quagga.net>
4Date: Mon, 13 Feb 2012 13:53:07 +0000
5Subject: bgpd: Fix regression in args consolidation, total should be inited from args
6
7bgpd: Fix regression in args consolidation, total should be inited from args
8
9* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
10
11Upstream-Status: Backport
12
13Signed-off-by: Kai Kang <kai.kang@windriver.com>
14---
15
16diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
17index 65af824..839f64d 100644
18--- a/bgpd/bgp_attr.c
19+++ b/bgpd/bgp_attr.c
20
21@@ -1646,7 +1646,7 @@
22 static bgp_attr_parse_ret_t
23 bgp_attr_unknown (struct bgp_attr_parser_args *args)
24 {
25- bgp_size_t total;
26+ bgp_size_t total = args->total;
27 struct transit *transit;
28 struct attr_extra *attre;
29 struct peer *const peer = args->peer;
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.default b/meta-networking/recipes-protocols/quagga/files/quagga.default
new file mode 100644
index 0000000000..0c1ce6c042
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga.default
@@ -0,0 +1,13 @@
1# If this option is set the /etc/init.d/quagga script automatically loads
2# the config via "vtysh -b" when the servers are started.
3vtysh_enable=yes
4
5# Bind all daemons to loopback only by default
6zebra_options=" --daemon -A 127.0.0.1"
7babeld_options="--daemon -A 127.0.0.1"
8bgpd_options=" --daemon -A 127.0.0.1"
9ospfd_options=" --daemon -A 127.0.0.1"
10ospf6d_options="--daemon -A ::1"
11ripd_options=" --daemon -A 127.0.0.1"
12ripngd_options="--daemon -A ::1"
13isisd_options=" --daemon -A 127.0.0.1"
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.init b/meta-networking/recipes-protocols/quagga/files/quagga.init
new file mode 100644
index 0000000000..60b5ab01a1
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga.init
@@ -0,0 +1,200 @@
1#!/bin/sh
2#
3# /etc/init.d/quagga -- start/stop the Quagga routing daemons
4#
5# Based on debian version by Endre Hirling <endre@mail.elte.hu> and
6# Christian Hammers <ch@debian.org>.
7#
8
9### BEGIN INIT INFO
10# Provides: quagga
11# Required-Start: $local_fs $network $remote_fs $syslog
12# Required-Stop: $local_fs $network $remote_fs $syslog
13# Default-Start: 2 3 4 5
14# Default-Stop: 0 1 6
15# Short-Description: start and stop the Quagga routing suite
16# Description: Quagga is a routing suite for IP routing protocols like
17# BGP, OSPF, RIP and others. This script contols the main
18# daemon "quagga" as well as the individual protocol daemons.
19### END INIT INFO
20
21# NOTE: sbin must be before bin so we get the iproute2 ip and not the
22# busybox ip command. The busybox one flushes all routes instead of just
23# the dynamic routes
24PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
25D_PATH=/usr/sbin
26C_PATH=/etc/quagga
27
28# Keep zebra first and do not list watchquagga!
29DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld"
30
31# Print the name of the pidfile.
32pidfile()
33{
34 echo "/var/run/quagga/$1.pid"
35}
36
37# Check if daemon is started by using the pidfile.
38started()
39{
40 [ -e `pidfile $1` ] && kill -0 `cat \`pidfile $1\`` 2> /dev/null && return 0
41 return 1
42}
43
44# Loads the config via vtysh -b if configured to do so.
45vtysh_b ()
46{
47 # Rember, that all variables have been incremented by 1 in convert_daemon_prios()
48 if [ "$vtysh_enable" = 2 -a -f $C_PATH/Quagga.conf ]; then
49 /usr/bin/vtysh -b
50 fi
51}
52
53# Check if the daemon is activated and if its executable and config files
54# are in place.
55# params: daemon name
56# returns: 0=ok, 1=error
57check_daemon()
58{
59 # If the integrated config file is used the others are not checked.
60 if [ -r "$C_PATH/Quagga.conf" ]; then
61 return 0
62 fi
63
64 # check for config file
65 if [ ! -r "$C_PATH/$1.conf" ]; then
66 return 1
67 fi
68 return 0
69}
70
71# Starts the server if it's not alrady running according to the pid file.
72# The Quagga daemons creates the pidfile when starting.
73start()
74{
75 if ! check_daemon $1; then echo -n " (!$1)"; return; fi
76 echo -n " $1"
77 start-stop-daemon \
78 --start \
79 --pidfile=`pidfile $1` \
80 --exec "$D_PATH/$1" \
81 -- \
82 `eval echo "$""$1""_options"`
83
84}
85
86# Stop the daemon given in the parameter, printing its name to the terminal.
87stop()
88{
89 if ! started "$1" ; then
90 echo -n " (!$1)"
91 return 0
92 else
93 PIDFILE=`pidfile $1`
94 PID=`cat $PIDFILE 2>/dev/null`
95 start-stop-daemon --stop --quiet --exec "$D_PATH/$1"
96 #
97 # Now we have to wait until $DAEMON has _really_ stopped.
98 #
99 if test -n "$PID" && kill -0 $PID 2>/dev/null; then
100 echo -n " (waiting) ."
101 cnt=0
102 while kill -0 $PID 2>/dev/null; do
103 cnt=`expr $cnt + 1`
104 if [ $cnt -gt 60 ]; then
105 # Waited 120 secs now, fail.
106 echo -n "Failed.. "
107 break
108 fi
109 sleep 2
110 echo -n "."
111 done
112 fi
113 echo -n " $1"
114 rm -f `pidfile $1`
115 fi
116}
117
118stop_all()
119{
120 local daemon_list
121 daemon_list=${1:-$DAEMONS}
122
123 echo -n "Stopping Quagga daemons:"
124 for daemon_name in $daemon_list; do
125 stop "$daemon_name"
126 done
127 echo "."
128}
129
130start_all()
131{
132 local daemon_list
133 daemon_list=${1:-$DAEMONS}
134
135 echo -n "Starting Quagga daemons:"
136 for daemon_name in $daemon_list; do
137 start "$daemon_name"
138 done
139 echo "."
140}
141
142status_all()
143{
144 local daemon_list
145 daemon_list=${1:-$DAEMONS}
146 res=1
147
148 echo -n "quagga: "
149 for daemon_name in $daemon_list; do
150 if started "$daemon_name" ; then
151 id=`cat \`pidfile $daemon_name\``
152 echo -n "$daemon_name (pid $id) "
153 res=0
154 fi
155 done
156 if [ $res -eq 0 ]; then
157 echo "is running..."
158 else
159 echo "is stopped..."
160 fi
161 exit $res
162}
163
164#########################################################
165# Main program #
166#########################################################
167
168# Load configuration
169test -f /etc/default/quagga && . /etc/default/quagga
170
171case "$1" in
172 start)
173 cd $C_PATH/
174 start_all $2
175 vtysh_b
176 ;;
177
178 stop)
179 stop_all $2
180 echo "Removing all routes made by zebra."
181 ip route flush proto zebra
182 ;;
183
184 status)
185 status_all $2
186 ;;
187
188 restart|force-reload)
189 $0 stop $2
190 sleep 1
191 $0 start $2
192 ;;
193
194 *)
195 echo "Usage: /etc/init.d/quagga {start|stop|restart|status|force-reload} [daemon]"
196 exit 1
197 ;;
198esac
199
200exit 0
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.pam b/meta-networking/recipes-protocols/quagga/files/quagga.pam
new file mode 100644
index 0000000000..3541a975ae
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/quagga.pam
@@ -0,0 +1,13 @@
1#
2# The PAM configuration file for the quagga `vtysh' service
3#
4
5# This allows root to change user infomation without being
6# prompted for a password
7auth sufficient pam_rootok.so
8
9# The standard Unix authentication modules, used with
10# NIS (man nsswitch) as well as normal /etc/passwd and
11# /etc/shadow entries.
12auth include common-auth
13
diff --git a/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
new file mode 100644
index 0000000000..4b8c9a929b
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
@@ -0,0 +1,50 @@
1ripd: Fix two bugs after received SIGHUP signal
2
3There are two problems for ripd implementation after received
4SIGHUP signal:
51). ripd didn't clean up ifp->connected list before reload
6 configuration file.
72). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
8 which lead to the unnecessary route to be advertised.
9
10Upstream-Status: Submitted [http://patchwork.diac24.net/patch/604/]
11
12Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
13Signed-off-by: Joe MacDonald <joe@deserted.net>
14---
15--- a/ripd/rip_interface.c
16+++ b/ripd/rip_interface.c
17@@ -500,6 +500,8 @@
18 struct listnode *node;
19 struct interface *ifp;
20 struct rip_interface *ri;
21+ struct connected *ifc;
22+ struct listnode *conn_node, *next;
23
24 for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp))
25 {
26@@ -514,6 +516,13 @@
27 thread_cancel (ri->t_wakeup);
28 ri->t_wakeup = NULL;
29 }
30+
31+ for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
32+ {
33+ ifc = listgetdata (conn_node);
34+ next = conn_node->next;
35+ listnode_delete (ifp->connected, ifc);
36+ }
37 }
38 }
39
40@@ -548,8 +557,8 @@
41 ri->key_chain = NULL;
42 }
43
44- ri->split_horizon = RIP_NO_SPLIT_HORIZON;
45- ri->split_horizon_default = RIP_NO_SPLIT_HORIZON;
46+ ri->split_horizon = RIP_SPLIT_HORIZON;
47+ ri->split_horizon_default = RIP_SPLIT_HORIZON;
48
49 ri->list[RIP_FILTER_IN] = NULL;
50 ri->list[RIP_FILTER_OUT] = NULL;
diff --git a/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga b/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
new file mode 100644
index 0000000000..cfb896a17b
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
@@ -0,0 +1,3 @@
1# <type> <owner> <group> <mode> <path> <linksource>
2d quagga quagga 0755 /var/run/quagga none
3d quagga quagga 0755 /var/log/quagga none \ No newline at end of file
diff --git a/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/meta-networking/recipes-protocols/quagga/files/watchquagga.default
new file mode 100644
index 0000000000..2d601ec97d
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/watchquagga.default
@@ -0,0 +1,12 @@
1# Watchquagga configuration
2#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
3watch_daemons="zebra"
4
5# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
6# the WATCH_DAEMONS line to reflect the daemons you are actually using):
7#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
8
9# Since we are using one quagga daemon for now, use the following line. If using
10# multiple daemons, comment the line below and uncoment the line mentioned
11# above.
12watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
diff --git a/meta-networking/recipes-protocols/quagga/files/watchquagga.init b/meta-networking/recipes-protocols/quagga/files/watchquagga.init
new file mode 100644
index 0000000000..5ddd94a3d6
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/watchquagga.init
@@ -0,0 +1,64 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: watchquagga
5# Required-Start: $local_fs $network $remote_fs $syslog
6# Required-Stop: $local_fs $network $remote_fs $syslog
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: start and stop the Quagga watchdog
10### END INIT INFO
11
12PATH=/bin:/usr/bin:/sbin:/usr/sbin
13
14# Load configuration
15test -f /etc/default/watchquagga && . /etc/default/watchquagga
16
17# Check that there are daemons to be monitored.
18[ -z "$watch_daemons" ] && exit 0
19
20pidfile="/var/run/quagga/watchquagga.pid"
21
22case "$1" in
23 start)
24 echo -n "Starting quagga watchdog daemon: watchquagga"
25 start-stop-daemon --start \
26 --pidfile $pidfile \
27 --exec /usr/sbin/watchquagga \
28 -- -d $watch_options $watch_daemons
29 echo "."
30 ;;
31
32 stop)
33 echo -n "Stopping quagga watchdog daemon: watchquagga"
34 start-stop-daemon --stop --quiet \
35 --pidfile $pidfile
36 echo "."
37 ;;
38
39 status)
40 echo -n "watchquagga "
41 res=1
42 [ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null
43 if [ $? -eq 0 ]; then
44 echo "(pid `cat $pidfile`) is running..."
45 res=0
46 else
47 echo "is stopped..."
48 fi
49 exit $res
50 ;;
51
52 restart|force-reload)
53 $0 stop $2
54 sleep 1
55 $0 start $2
56 ;;
57
58 *)
59 echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}"
60 exit 1
61 ;;
62esac
63
64exit 0
diff --git a/meta-networking/recipes-protocols/quagga/files/work-with-new-readline.patch b/meta-networking/recipes-protocols/quagga/files/work-with-new-readline.patch
new file mode 100644
index 0000000000..2bd333a70a
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/work-with-new-readline.patch
@@ -0,0 +1,34 @@
1From 66df315d2a270a254c613a4d2e72c0ea47f15a71 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 27 Mar 2014 09:35:29 +0000
4Subject: [PATCH] vtysh/vtysh.c: works with new readline
5
6The Function and CPPFunction had been removed by in readline 6.3, use
7the new functions to replace them.
8
9Upstream-Status: Pending
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12---
13 vtysh/vtysh.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
17index 431c08e..fdd82fb 100644
18--- a/vtysh/vtysh.c
19+++ b/vtysh/vtysh.c
20@@ -2212,9 +2212,9 @@ void
21 vtysh_readline_init (void)
22 {
23 /* readline related settings. */
24- rl_bind_key ('?', (Function *) vtysh_rl_describe);
25+ rl_bind_key ('?', (rl_command_func_t *) vtysh_rl_describe);
26 rl_completion_entry_function = vtysh_completion_entry_function;
27- rl_attempted_completion_function = (CPPFunction *)new_completion;
28+ rl_attempted_completion_function = (rl_completion_func_t *)new_completion;
29 /* do not append space after completion. It will be appended
30 * in new_completion() function explicitly. */
31 rl_completion_append_character = '\0';
32--
331.8.3.4
34
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
new file mode 100644
index 0000000000..60baab8011
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -0,0 +1,207 @@
1SUMMARY = "BGP/OSPF/RIP routing daemon"
2DESCRIPTION = "Quagga is a routing software suite, providing \
3implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \
4Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
5Quagga is a fork of GNU Zebra which was developed by Kunihiro \
6Ishiguro. The Quagga tree aims to build a more involved community \
7around Quagga than the current centralised model of GNU Zebra."
8HOMEPAGE = "http://www.nongnu.org/quagga/"
9SECTION = "network"
10LICENSE = "GPL-2.0 & LGPL-2.0"
11DEPENDS = "readline ncurses perl-native"
12DEPENDS += "${@base_contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
13SNMP_CONF="${@base_contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
14
15LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
16 file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
17
18INC_PR = "r2"
19
20# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
21RDEPENDS_${PN} += "iproute2"
22
23QUAGGASUBDIR = ""
24# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
25# versions and leave it empty for recent versions.
26SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz;name=quagga-${PV} \
27 file://fix-for-lib-inpath.patch \
28 file://quagga-0.99.17-libcap.patch \
29 file://quagga-fix-CVE-2013-6051.patch \
30 file://Zebra-sync-zebra-routing-table-with-the-kernel-one.patch \
31 file://quagga.init \
32 file://quagga.default \
33 file://watchquagga.init \
34 file://watchquagga.default \
35 file://volatiles.03_quagga \
36 file://quagga.pam \
37 file://ripd-fix-two-bugs-after-received-SIGHUP.patch \
38 file://quagga-Avoid-duplicate-connected-address.patch \
39"
40
41MIRRORS += "http://download.savannah.gnu.org/releases/ http://download-mirror.savannah.gnu.org/releases/ \n"
42
43PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
44PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
45PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
46
47inherit autotools update-rc.d useradd
48
49EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
50 --localstatedir=${localstatedir}/run/quagga \
51 --enable-exampledir=${docdir}/quagga/examples/ \
52 --enable-vtysh \
53 --enable-isisd \
54 --enable-watchquagga \
55 --enable-ospf-te \
56 --enable-opaque-lsa \
57 --enable-ipv6 \
58 --enable-ospfclient=yes \
59 --enable-multipath=64 \
60 --enable-user=quagga \
61 --enable-group=quagga \
62 --enable-vty-group=quaggavty \
63 --enable-configfile-mask=0640 \
64 --enable-logfile-mask=0640 \
65 --enable-rtadv \
66 --enable-linux24-tcp-md5 \
67 ap_cv_cc_pie=no \
68 ${SNMP_CONF}"
69
70do_install () {
71 # Install init script and default settings
72 install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
73 ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
74 install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
75 install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
76 install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
77 install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
78 install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
79
80 # Install sample configurations for the daemons
81 for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
82 install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
83 done
84
85 for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
86 touch ${D}${sysconfdir}/quagga/$f.conf
87 done
88 chown quagga:quaggavty ${D}${sysconfdir}/quagga
89 chown quagga:quagga ${D}${sysconfdir}/quagga/*.conf
90 chmod 750 ${D}${sysconfdir}/quagga
91 chmod 640 ${D}${sysconfdir}/quagga/*.conf
92
93 # Install quagga
94 oe_runmake install DESTDIR=${D} prefix=${prefix} \
95 sbindir=${sbindir} \
96 sysconfdir=${sysconfdir}/quagga \
97 localstatedir=${localstatedir}/run/quagga
98
99 # Fix hardcoded paths
100 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
101 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
102 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
103 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
104 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
105
106 # Remove generated info dir file, it doesn't belong in the generated
107 # package.
108 rm -f ${D}${infodir}/dir
109
110 # For PAM
111 for feature in ${DISTRO_FEATURES}; do
112 if [ "$feature" = "pam" ]; then
113 install -D -m 644 ${WORKDIR}/quagga.pam ${D}/${sysconfdir}/pam.d/quagga
114 break
115 fi
116 done
117
118}
119
120# Split into a main package and separate per-protocol packages
121PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-babeld ${PN}-bgpd \
122 ${PN}-ripd ${PN}-ripngd ${PN}-isisd \
123 ${PN}-ospfclient ${PN}-watchquagga"
124
125FILES_${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*"
126FILES_${PN}-ospf6d = "${sbindir}/ospf6d"
127FILES_${PN}-babeld = "${sbindir}/babeld"
128FILES_${PN}-bgpd = "${sbindir}/bgpd"
129FILES_${PN}-ripd = "${sbindir}/ripd"
130FILES_${PN}-ripngd = "${sbindir}/ripngd"
131FILES_${PN}-isisd = "${sbindir}/isisd"
132FILES_${PN}-ospfclient = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*"
133FILES_${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
134 ${sysconfdir}/init.d/watchquagga"
135
136# Indicate that the default files are configuration files
137CONFFILES_${PN} = "${sysconfdir}/default/quagga \
138 ${sysconfdir}/quagga/bgpd.conf \
139 ${sysconfdir}/quagga/vtysh.conf \
140 ${sysconfdir}/quagga/babeld.conf \
141 ${sysconfdir}/quagga/isisd.conf \
142 ${sysconfdir}/quagga/ospfd.conf \
143 ${sysconfdir}/quagga/ripngd.conf \
144 ${sysconfdir}/quagga/zebra.conf \
145 ${sysconfdir}/quagga/ripd.conf \
146 ${sysconfdir}/quagga/ospf6d.conf \
147 "
148CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"
149
150# Stop the names being rewritten due to the internal shared libraries
151DEBIAN_NOAUTONAME_${PN}-ospfd = "1"
152DEBIAN_NOAUTONAME_${PN}-ospfclient = "1"
153
154# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
155RDEPENDS_${PN} += "iproute2"
156
157# Main init script starts all deamons
158# Seperate init script for watchquagga
159INITSCRIPT_PACKAGES = "${PN} ${PN}-watchquagga"
160INITSCRIPT_NAME_${PN} = "quagga"
161INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
162INITSCRIPT_NAME_${PN}-watchquagga = "watchquagga"
163INITSCRIPT_PARAMS_${PN}-watchquagga = "defaults 90 10"
164
165# Add quagga's user and group
166USERADD_PACKAGES = "${PN}"
167GROUPADD_PARAM_${PN} = "--system quagga ; --system quaggavty"
168USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga --shell /bin/false quagga"
169
170pkg_postinst_${PN} () {
171 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
172 ${sysconfdir}/init.d/populate-volatile.sh update
173 fi
174}
175
176# Stop apps before uninstall
177pkg_prerm_${PN} () {
178 ${sysconfdir}/init.d/quagga stop
179}
180
181pkg_prerm_${PN}-ospfd () {
182 ${sysconfdir}/init.d/quagga stop ospfd
183}
184
185pkg_prerm_${PN}-ospf6d () {
186 ${sysconfdir}/init.d/quagga stop ospf6d
187}
188
189pkg_prerm_${PN}-babeld () {
190 ${sysconfdir}/init.d/quagga stop babeld
191}
192
193pkg_prerm_${PN}-bgpd () {
194 ${sysconfdir}/init.d/quagga stop bgpd
195}
196
197pkg_prerm_${PN}-ripd () {
198 ${sysconfdir}/init.d/quagga stop ripd
199}
200
201pkg_prerm_${PN}-ripngd () {
202 ${sysconfdir}/init.d/quagga stop ripngd
203}
204
205pkg_prerm_${PN}-isisd () {
206 ${sysconfdir}/init.d/quagga stop isisd
207}
diff --git a/meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb b/meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb
new file mode 100644
index 0000000000..0988b70eb0
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb
@@ -0,0 +1,15 @@
1require quagga.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI += "file://0001-doc-fix-makeinfo-errors-and-one-warning.patch \
6 file://lingering-IP-address-after-deletion-BZ-486.patch \
7 file://build-fix-extract.pl-for-cross-compilation.patch \
8 file://babel-close-the-stdout-stderr-as-in-other-daemons.patch \
9 file://work-with-new-readline.patch \
10"
11
12SRC_URI[quagga-0.99.21.md5sum] = "99840adbe57047c90dfba6b6ed9aec7f"
13SRC_URI[quagga-0.99.21.sha256sum] = "9b8aea9026b4771a28e254a66cbd854723bcd0d71eebd0201d11838d4eb392ee"
14
15QUAGGASUBDIR = ""