]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
2x bugfixes for libip6t_tcp from Andras Kis-Szabo
authorAndrás Kis-Szabó <kisza@securityaudit.hu>
Mon, 8 Jul 2002 10:58:50 +0000 (10:58 +0000)
committerJames Morris <jmorris@namei.org>
Mon, 8 Jul 2002 10:58:50 +0000 (10:58 +0000)
extensions/libip6t_tcp.c

index 2eb33dd05fb93606397f0e05d0df9e165a4cb4fd..8e54dc445a617c79e11b97cdc7fd36fdc2984538 100644 (file)
@@ -143,7 +143,7 @@ parse_tcp_option(const char *option, u_int8_t *result)
 {
        unsigned int ret;
 
-       if (string_to_number(option, 1, 266, &ret) == -1)
+       if (string_to_number(option, 1, 255, &ret) == -1)
                exit_error(PARAMETER_PROBLEM, "Bad TCP option `%s'", option);
 
        *result = (u_int8_t)ret;
@@ -371,7 +371,7 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
        const struct ip6t_tcp *tcpinfo = (struct ip6t_tcp *)match->data;
 
        if (tcpinfo->spts[0] != 0
-           && tcpinfo->spts[1] != 0xFFFF) {
+           || tcpinfo->spts[1] != 0xFFFF) {
                if (tcpinfo->invflags & IP6T_TCP_INV_SRCPT)
                        printf("! ");
                if (tcpinfo->spts[0]