summaryrefslogtreecommitdiffstats
path: root/extensions/libct_proto_udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libct_proto_udp.c')
-rw-r--r--extensions/libct_proto_udp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/extensions/libct_proto_udp.c b/extensions/libct_proto_udp.c
index d74def5..f9793d0 100644
--- a/extensions/libct_proto_udp.c
+++ b/extensions/libct_proto_udp.c
@@ -85,6 +85,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_ORIG_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_ORIG_SPORT;
break;
case '2':
@@ -95,6 +97,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_ORIG_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_ORIG_DPORT;
break;
case '3':
@@ -105,6 +109,8 @@ static int parse_options(char c,
ATTR_REPL_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_REPL_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_REPL_SPORT;
break;
case '4':
@@ -115,6 +121,8 @@ static int parse_options(char c,
ATTR_REPL_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(ct, ATTR_REPL_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_REPL_DPORT;
break;
case '5':
@@ -125,6 +133,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(mask, ATTR_ORIG_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_MASK_SPORT;
break;
case '6':
@@ -135,6 +145,8 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(mask, ATTR_ORIG_L4PROTO, IPPROTO_UDP);
+
*flags |= UDP_MASK_DPORT;
break;
case '7':
@@ -145,6 +157,10 @@ static int parse_options(char c,
ATTR_ORIG_PORT_SRC,
htons(atoi(optarg)));
+ nfct_set_attr_u8(exptuple,
+ ATTR_ORIG_L4PROTO,
+ IPPROTO_UDP);
+
*flags |= UDP_EXPTUPLE_SPORT;
break;
case '8':
@@ -155,6 +171,10 @@ static int parse_options(char c,
ATTR_ORIG_PORT_DST,
htons(atoi(optarg)));
+ nfct_set_attr_u8(exptuple,
+ ATTR_ORIG_L4PROTO,
+ IPPROTO_UDP);
+
*flags |= UDP_EXPTUPLE_DPORT;
break;
}