summaryrefslogtreecommitdiff
path: root/extensions/libct_proto_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libct_proto_tcp.c')
-rw-r--r--extensions/libct_proto_tcp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c
index dc48d09..0246758 100644
--- a/extensions/libct_proto_tcp.c
+++ b/extensions/libct_proto_tcp.c
@@ -103,6 +103,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_ORIG_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_ORIG_SPORT;
break;
case '2':
@@ -113,6 +115,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_ORIG_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_ORIG_DPORT;
break;
case '3':
@@ -123,6 +127,8 @@ static int parse_options(char c,
ATTR_REPL_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_REPL_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_REPL_SPORT;
break;
case '4':
@@ -133,6 +139,8 @@ static int parse_options(char c,
ATTR_REPL_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_REPL_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_REPL_DPORT;
break;
case '5':
@@ -143,6 +151,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(mask, ATTR_ORIG_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_MASK_SPORT;
break;
case '6':
@@ -153,6 +163,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(mask, ATTR_ORIG_L4PROTO, IPPROTO_TCP);
+
*flags |= TCP_MASK_DPORT;
break;
case '7':
@@ -180,6 +192,10 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(exptuple,
+ ATTR_ORIG_L4PROTO,
+ IPPROTO_TCP);
+
*flags |= TCP_EXPTUPLE_SPORT;
break;
case '9':
@@ -190,6 +206,10 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(exptuple,
+ ATTR_ORIG_L4PROTO,
+ IPPROTO_TCP);
+
*flags |= TCP_EXPTUPLE_DPORT;
break;
}