diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-12-04 01:07:17 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-12-04 01:07:17 +0000 |
commit | 3b361485bca7bc4eca6ac0d8ec53a2b27b981240 (patch) | |
tree | d395fb9af2f8b31d3af5836c82107963cae23ddc /extensions | |
parent | 5891b45e0eee0307a29ed5103fe6d596f6a37ebd (diff) | |
download | conntrack-tools-3b361485bca7bc4eca6ac0d8ec53a2b27b981240.tar.gz conntrack-tools-3b361485bca7bc4eca6ac0d8ec53a2b27b981240.zip |
o Restore include "conntrack.h" in ICMP handler
o Add missing flags coversion in SCTP handler
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/libct_proto_icmp.c | 1 | ||||
-rw-r--r-- | extensions/libct_proto_sctp.c | 24 |
2 files changed, 13 insertions, 12 deletions
diff --git a/extensions/libct_proto_icmp.c b/extensions/libct_proto_icmp.c index afae25e..57a621f 100644 --- a/extensions/libct_proto_icmp.c +++ b/extensions/libct_proto_icmp.c @@ -15,6 +15,7 @@ #include <netinet/ip_icmp.h> #include <libnetfilter_conntrack/libnetfilter_conntrack.h> #include <libnetfilter_conntrack/libnetfilter_conntrack_icmp.h> +#include "conntrack.h" static struct option opts[] = { {"icmp-type", 1, 0, '1'}, diff --git a/extensions/libct_proto_sctp.c b/extensions/libct_proto_sctp.c index 7ff1dcf..825cbd9 100644 --- a/extensions/libct_proto_sctp.c +++ b/extensions/libct_proto_sctp.c @@ -56,25 +56,25 @@ static int parse_options(char c, char *argv[], case '1': if (optarg) { orig->l4src.sctp.port = htons(atoi(optarg)); - *flags |= ORIG_SPORT; + *flags |= SCTP_ORIG_SPORT; } break; case '2': if (optarg) { orig->l4dst.sctp.port = htons(atoi(optarg)); - *flags |= ORIG_DPORT; + *flags |= SCTP_ORIG_DPORT; } break; case '3': if (optarg) { reply->l4src.sctp.port = htons(atoi(optarg)); - *flags |= REPL_SPORT; + *flags |= SCTP_REPL_SPORT; } break; case '4': if (optarg) { reply->l4dst.sctp.port = htons(atoi(optarg)); - *flags |= REPL_DPORT; + *flags |= SCTP_REPL_DPORT; } break; case '5': @@ -92,7 +92,7 @@ static int parse_options(char c, char *argv[], printf("doh?\n"); return 0; } - *flags |= STATE; + *flags |= SCTP_STATE; } break; } @@ -106,23 +106,23 @@ static int final_check(unsigned int flags, { int ret = 0; - if ((flags & (ORIG_SPORT|ORIG_DPORT)) - && !(flags & (REPL_SPORT|REPL_DPORT))) { + if ((flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT)) + && !(flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT))) { reply->l4src.sctp.port = orig->l4dst.sctp.port; reply->l4dst.sctp.port = orig->l4src.sctp.port; ret = 1; - } else if (!(flags & (ORIG_SPORT|ORIG_DPORT)) - && (flags & (REPL_SPORT|REPL_DPORT))) { + } else if (!(flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT)) + && (flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT))) { orig->l4src.sctp.port = reply->l4dst.sctp.port; orig->l4dst.sctp.port = reply->l4src.sctp.port; ret = 1; } - if ((flags & (ORIG_SPORT|ORIG_DPORT)) - && ((flags & (REPL_SPORT|REPL_DPORT)))) + if ((flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT)) + && ((flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT)))) ret = 1; /* --state is missing and we are trying to create a conntrack */ - if (ret && (command & CT_CREATE) && (!(flags & STATE))) + if (ret && (command & CT_CREATE) && (!(flags & SCTP_STATE))) ret = 0; return ret; |