]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_LED: fix parsing of delay
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 30 May 2013 10:44:43 +0000 (12:44 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 30 May 2013 10:48:17 +0000 (12:48 +0200)
Closes bugzilla:
https://bugzilla.netfilter.org/show_bug.cgi?id=825

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_LED.c

index e6cf849764256651c17e9e9e3bb3037318f2b993..8622c379e68bcbe49f14b2c2b1e0f44518a7827e 100644 (file)
@@ -49,7 +49,6 @@ static void LED_help(void)
 static void LED_parse(struct xt_option_call *cb)
 {
        struct xt_led_info *led = cb->data;
-       unsigned int delay;
 
        xtables_option_parse(cb);
        switch (cb->entry->id) {
@@ -60,7 +59,7 @@ static void LED_parse(struct xt_option_call *cb)
        case O_LED_DELAY:
                if (strncasecmp(cb->arg, "inf", 3) == 0)
                        led->delay = -1;
-               else if (!xtables_strtoui(cb->arg, NULL, &delay, 0, UINT32_MAX))
+               else if (!xtables_strtoui(cb->arg, NULL, &led->delay, 0, UINT32_MAX))
                        xtables_error(PARAMETER_PROBLEM,
                                "Delay value must be within range 0..%u",
                                UINT32_MAX);