diff options
author | Xufeng Zhang <xufeng.zhang@windriver.com> | 2013-10-24 17:48:41 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2013-10-31 10:05:00 -0400 |
commit | 27ba970b9eabd254aea24848420c4d3b8674761f (patch) | |
tree | 014c2c53e60d9d2630ce011474caa204cc5ee3fa | |
parent | e9759bfafb9f19b4dafb8c4888097690030ea616 (diff) | |
download | meta-openembedded-27ba970b9eabd254aea24848420c4d3b8674761f.tar.gz |
quagga/ripd: Fix two bugs after received SIGHUP signal
There are two problems for ripd implementation after received
SIGHUP signal:
1). ripd didn't clean up ifp->connected list before reload
configuration file which makes the same advertise packet
being sent multiple times(depends on how many SIGHUP was recieved).
2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
during restart which is different from the flag when ripd is
firstly started up, leading to unnecessary route to be advertised.
[YOCTO #5266]
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r-- | meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch | 50 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/quagga/quagga.inc | 3 |
2 files changed, 52 insertions, 1 deletions
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 000000000..4b8c9a929 --- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | ripd: Fix two bugs after received SIGHUP signal | ||
2 | |||
3 | There are two problems for ripd implementation after received | ||
4 | SIGHUP signal: | ||
5 | 1). ripd didn't clean up ifp->connected list before reload | ||
6 | configuration file. | ||
7 | 2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON | ||
8 | which lead to the unnecessary route to be advertised. | ||
9 | |||
10 | Upstream-Status: Submitted [http://patchwork.diac24.net/patch/604/] | ||
11 | |||
12 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> | ||
13 | Signed-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/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc index 872087606..9d900afae 100644 --- a/meta-networking/recipes-protocols/quagga/quagga.inc +++ b/meta-networking/recipes-protocols/quagga/quagga.inc | |||
@@ -31,7 +31,8 @@ SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagg | |||
31 | file://quagga.default \ | 31 | file://quagga.default \ |
32 | file://watchquagga.init \ | 32 | file://watchquagga.init \ |
33 | file://watchquagga.default \ | 33 | file://watchquagga.default \ |
34 | file://volatiles.03_quagga" | 34 | file://volatiles.03_quagga \ |
35 | file://ripd-fix-two-bugs-after-received-SIGHUP.patch" | ||
35 | 36 | ||
36 | PACKAGECONFIG ??= "" | 37 | PACKAGECONFIG ??= "" |
37 | PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap" | 38 | PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap" |