diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch | |
download | meta-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/files/ripd-fix-two-bugs-after-received-SIGHUP.patch')
-rw-r--r-- | meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch | 50 |
1 files changed, 50 insertions, 0 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 0000000000..4b8c9a929b --- /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; | ||