]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libipt_ECN: set proper option flags
authorJan Engelhardt <jengelh@medozas.de>
Sat, 19 Feb 2011 19:00:06 +0000 (20:00 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 19 Feb 2011 19:08:29 +0000 (20:08 +0100)
When specifying --ecn-tcp-remove, *flags will be wrongly set to denote
that --ecn-ip-ect had been specified.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libipt_ECN.c

index e1f29b6a485d5e4b8e71102e1e5395516b13315a..2aa1a00c18976290126ece91c574657553f67d77 100644 (file)
@@ -53,7 +53,7 @@ static int ECN_parse(int c, char **argv, int invert, unsigned int *flags,
                einfo->operation = IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR;
                einfo->proto.tcp.ece = 0;
                einfo->proto.tcp.cwr = 0;
-               *flags = 1;
+               *flags |= IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR;
                break;
        case 'G':
                if (*flags & IPT_ECN_OP_SET_CWR)