Patchwork conntrackd: don't resync expectations if such sync has been disabled

login
register
mail settings
Submitter Vincent Bernat
Date Aug. 2, 2012, 3:33 p.m.
Message ID <1343921636-6527-1-git-send-email-bernat@luffy.cx>
Download mbox | patch
Permalink /patch/174774/
State Accepted
Headers show

Comments

Vincent Bernat - Aug. 2, 2012, 3:33 p.m.
conntrackd was segfaulting with `ExpectationSync` set to `Off`.

Signed-off-by: Vincent Bernat <bernat@luffy.cx>
---
 src/ctnl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Pablo Neira - Aug. 3, 2012, 9:02 a.m.
On Thu, Aug 02, 2012 at 05:33:56PM +0200, Vincent Bernat wrote:
> conntrackd was segfaulting with `ExpectationSync` set to `Off`.
> 
> Signed-off-by: Vincent Bernat <bernat@luffy.cx>
> ---
>  src/ctnl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ctnl.c b/src/ctnl.c
> index 107cd5d..154b612 100644
> --- a/src/ctnl.c
> +++ b/src/ctnl.c
> @@ -164,7 +164,7 @@ static void do_polling_alarm(struct alarm_block *a, void *data)
>  		STATE(mode)->internal->exp.purge();
>  
>  	nl_send_resync(STATE(resync));
> -	nl_send_expect_resync(STATE(resync));
> +	if (CONFIG(flags) & CTD_EXPECT) nl_send_expect_resync(STATE(resync));

Applied (with little change to fix coding style).

Thanks Vincent.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/src/ctnl.c b/src/ctnl.c
index 107cd5d..154b612 100644
--- a/src/ctnl.c
+++ b/src/ctnl.c
@@ -164,7 +164,7 @@  static void do_polling_alarm(struct alarm_block *a, void *data)
 		STATE(mode)->internal->exp.purge();
 
 	nl_send_resync(STATE(resync));
-	nl_send_expect_resync(STATE(resync));
+	if (CONFIG(flags) & CTD_EXPECT) nl_send_expect_resync(STATE(resync));
 	add_alarm(&STATE(polling_alarm), CONFIG(poll_kernel_secs), 0);
 }