Patchwork (fix_led_parse_delay) value will now be set

login
register
mail settings
Submitter Florian Eckert
Date Aug. 6, 2013, 1:26 p.m.
Message ID <1375795561-11839-1-git-send-email-Eckert.Florian@googlemail.com>
Download mbox | patch
Permalink /patch/265055/
State Not Applicable
Headers show

Comments

Florian Eckert - Aug. 6, 2013, 1:26 p.m.
---
 extensions/libxt_LED.c |    2 ++
 1 Datei geändert, 2 Zeilen hinzugefügt(+)
Pablo Neira - Aug. 6, 2013, 1:38 p.m.
On Tue, Aug 06, 2013 at 03:26:01PM +0200, Florian Eckert wrote:
> ---
>  extensions/libxt_LED.c |    2 ++
>  1 Datei geändert, 2 Zeilen hinzugefügt(+)
> 
> diff --git a/extensions/libxt_LED.c b/extensions/libxt_LED.c
> index 8622c37..fd1e726 100644
> --- a/extensions/libxt_LED.c
> +++ b/extensions/libxt_LED.c
> @@ -63,6 +63,8 @@ static void LED_parse(struct xt_option_call *cb)
>  			xtables_error(PARAMETER_PROBLEM,
>  				"Delay value must be within range 0..%u",
>  				UINT32_MAX);
> +		else
> +			led->delay=atoi(cb->arg);
>  		break;

We have a fix for this already:

http://git.netfilter.org/iptables/commit/?id=96c42d4c46df3edbd41fa47b860fba217f03cfeb

Will be available in upcoming iptables 1.4.20.
--
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/extensions/libxt_LED.c b/extensions/libxt_LED.c
index 8622c37..fd1e726 100644
--- a/extensions/libxt_LED.c
+++ b/extensions/libxt_LED.c
@@ -63,6 +63,8 @@  static void LED_parse(struct xt_option_call *cb)
 			xtables_error(PARAMETER_PROBLEM,
 				"Delay value must be within range 0..%u",
 				UINT32_MAX);
+		else
+			led->delay=atoi(cb->arg);
 		break;
 	case O_LED_ALWAYS_BLINK:
 		led->always_blink = 1;