* [PATCH] quagga/ripd: Fix two bugs after received SIGHUP signal
@ 2013-10-24 9:34 Xufeng Zhang
2013-10-24 9:31 ` Rongqing Li
0 siblings, 1 reply; 3+ messages in thread
From: Xufeng Zhang @ 2013-10-24 9:34 UTC (permalink / raw)
To: openembedded-core
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]
[ CQID: WIND00372703 ]
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
---
.../ripd-fix-two-bugs-after-received-SIGHUP.patch | 49 ++++++++++++++++++++
.../recipes-protocols/quagga/quagga.inc | 3 +-
2 files changed, 51 insertions(+), 1 deletions(-)
create mode 100644 meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
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 0000000..c081143
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
@@ -0,0 +1,49 @@
+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.
+2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
+ which lead to the unnecessary route to be advertised.
+
+Upstream-Status: Pending
+
+Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
+---
+--- a/ripd/rip_interface.c
++++ b/ripd/rip_interface.c
+@@ -500,6 +500,8 @@
+ struct listnode *node;
+ struct interface *ifp;
+ struct rip_interface *ri;
++ struct connected *ifc;
++ struct listnode *conn_node, *next;
+
+ for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp))
+ {
+@@ -514,6 +516,13 @@
+ thread_cancel (ri->t_wakeup);
+ ri->t_wakeup = NULL;
+ }
++
++ for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
++ {
++ ifc = listgetdata (conn_node);
++ next = conn_node->next;
++ listnode_delete (ifp->connected, ifc);
++ }
+ }
+ }
+
+@@ -548,8 +557,8 @@
+ ri->key_chain = NULL;
+ }
+
+- ri->split_horizon = RIP_NO_SPLIT_HORIZON;
+- ri->split_horizon_default = RIP_NO_SPLIT_HORIZON;
++ ri->split_horizon = RIP_SPLIT_HORIZON;
++ ri->split_horizon_default = RIP_SPLIT_HORIZON;
+
+ ri->list[RIP_FILTER_IN] = NULL;
+ 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 89b9f7a..bf37067 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
file://quagga.default \
file://watchquagga.init \
file://watchquagga.default \
- file://volatiles.03_quagga"
+ file://volatiles.03_quagga \
+ file://ripd-fix-two-bugs-after-received-SIGHUP.patch"
PACKAGECONFIG ??= ""
PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
--
1.7.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] quagga/ripd: Fix two bugs after received SIGHUP signal
2013-10-24 9:34 [PATCH] quagga/ripd: Fix two bugs after received SIGHUP signal Xufeng Zhang
@ 2013-10-24 9:31 ` Rongqing Li
2013-10-24 9:45 ` Xufeng Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Rongqing Li @ 2013-10-24 9:31 UTC (permalink / raw)
To: Xufeng Zhang; +Cc: openembedded-core
You should send it to openembedded-devel@lists.openembedded.org
and with title [PATCH meta-networking]
On 10/24/2013 05:34 PM, Xufeng Zhang wrote:
> 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]
> [ CQID: WIND00372703 ]
Romve CQID
Thanks
-Roy
>
> Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
> ---
> .../ripd-fix-two-bugs-after-received-SIGHUP.patch | 49 ++++++++++++++++++++
> .../recipes-protocols/quagga/quagga.inc | 3 +-
> 2 files changed, 51 insertions(+), 1 deletions(-)
> create mode 100644 meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
>
> 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 0000000..c081143
> --- /dev/null
> +++ b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
> @@ -0,0 +1,49 @@
> +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.
> +2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
> + which lead to the unnecessary route to be advertised.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
> +---
> +--- a/ripd/rip_interface.c
> ++++ b/ripd/rip_interface.c
> +@@ -500,6 +500,8 @@
> + struct listnode *node;
> + struct interface *ifp;
> + struct rip_interface *ri;
> ++ struct connected *ifc;
> ++ struct listnode *conn_node, *next;
> +
> + for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp))
> + {
> +@@ -514,6 +516,13 @@
> + thread_cancel (ri->t_wakeup);
> + ri->t_wakeup = NULL;
> + }
> ++
> ++ for (conn_node = listhead (ifp->connected); conn_node; conn_node = next)
> ++ {
> ++ ifc = listgetdata (conn_node);
> ++ next = conn_node->next;
> ++ listnode_delete (ifp->connected, ifc);
> ++ }
> + }
> + }
> +
> +@@ -548,8 +557,8 @@
> + ri->key_chain = NULL;
> + }
> +
> +- ri->split_horizon = RIP_NO_SPLIT_HORIZON;
> +- ri->split_horizon_default = RIP_NO_SPLIT_HORIZON;
> ++ ri->split_horizon = RIP_SPLIT_HORIZON;
> ++ ri->split_horizon_default = RIP_SPLIT_HORIZON;
> +
> + ri->list[RIP_FILTER_IN] = NULL;
> + 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 89b9f7a..bf37067 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
> file://quagga.default \
> file://watchquagga.init \
> file://watchquagga.default \
> - file://volatiles.03_quagga"
> + file://volatiles.03_quagga \
> + file://ripd-fix-two-bugs-after-received-SIGHUP.patch"
>
> PACKAGECONFIG ??= ""
> PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] quagga/ripd: Fix two bugs after received SIGHUP signal
2013-10-24 9:31 ` Rongqing Li
@ 2013-10-24 9:45 ` Xufeng Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Xufeng Zhang @ 2013-10-24 9:45 UTC (permalink / raw)
To: Rongqing Li; +Cc: openembedded-core
On 10/24/2013 05:31 PM, Rongqing Li wrote:
> You should send it to openembedded-devel@lists.openembedded.org
>
> and with title [PATCH meta-networking]
>
>
> On 10/24/2013 05:34 PM, Xufeng Zhang wrote:
>> 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]
>> [ CQID: WIND00372703 ]
>
>
> Romve CQID
Ok, thanks a lot!
Thanks,
Xufeng
>
> Thanks
>
> -Roy
>
>>
>> Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
>> ---
>> .../ripd-fix-two-bugs-after-received-SIGHUP.patch | 49
>> ++++++++++++++++++++
>> .../recipes-protocols/quagga/quagga.inc | 3 +-
>> 2 files changed, 51 insertions(+), 1 deletions(-)
>> create mode 100644
>> meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
>>
>>
>> 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 0000000..c081143
>> --- /dev/null
>> +++
>> b/meta-networking/recipes-protocols/quagga/files/ripd-fix-two-bugs-after-received-SIGHUP.patch
>>
>> @@ -0,0 +1,49 @@
>> +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.
>> +2). ripd reset ri->split_horizon flag to RIP_NO_SPLIT_HORIZON
>> + which lead to the unnecessary route to be advertised.
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
>> +---
>> +--- a/ripd/rip_interface.c
>> ++++ b/ripd/rip_interface.c
>> +@@ -500,6 +500,8 @@
>> + struct listnode *node;
>> + struct interface *ifp;
>> + struct rip_interface *ri;
>> ++ struct connected *ifc;
>> ++ struct listnode *conn_node, *next;
>> +
>> + for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp))
>> + {
>> +@@ -514,6 +516,13 @@
>> + thread_cancel (ri->t_wakeup);
>> + ri->t_wakeup = NULL;
>> + }
>> ++
>> ++ for (conn_node = listhead (ifp->connected); conn_node;
>> conn_node = next)
>> ++ {
>> ++ ifc = listgetdata (conn_node);
>> ++ next = conn_node->next;
>> ++ listnode_delete (ifp->connected, ifc);
>> ++ }
>> + }
>> + }
>> +
>> +@@ -548,8 +557,8 @@
>> + ri->key_chain = NULL;
>> + }
>> +
>> +- ri->split_horizon = RIP_NO_SPLIT_HORIZON;
>> +- ri->split_horizon_default = RIP_NO_SPLIT_HORIZON;
>> ++ ri->split_horizon = RIP_SPLIT_HORIZON;
>> ++ ri->split_horizon_default = RIP_SPLIT_HORIZON;
>> +
>> + ri->list[RIP_FILTER_IN] = NULL;
>> + 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 89b9f7a..bf37067 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
>> file://quagga.default \
>> file://watchquagga.init \
>> file://watchquagga.default \
>> - file://volatiles.03_quagga"
>> + file://volatiles.03_quagga \
>> + file://ripd-fix-two-bugs-after-received-SIGHUP.patch"
>>
>> PACKAGECONFIG ??= ""
>> PACKAGECONFIG[cap] =
>> "--enable-capabilities,--disable-capabilities,libcap"
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-24 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24 9:34 [PATCH] quagga/ripd: Fix two bugs after received SIGHUP signal Xufeng Zhang
2013-10-24 9:31 ` Rongqing Li
2013-10-24 9:45 ` Xufeng Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox