summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/libipt_DNAT.c4
-rw-r--r--extensions/libipt_MASQUERADE.c4
-rw-r--r--extensions/libipt_REDIRECT.c4
-rw-r--r--extensions/libipt_SNAT.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/extensions/libipt_DNAT.c b/extensions/libipt_DNAT.c
index b5c6ff56..5608947e 100644
--- a/extensions/libipt_DNAT.c
+++ b/extensions/libipt_DNAT.c
@@ -69,7 +69,7 @@ parse_to(char *arg, int portok, struct ipt_natinfo *info)
if (!portok)
exit_error(PARAMETER_PROBLEM,
- "Need TCP or UDP with port specification");
+ "Need TCP, UDP, SCTP or DCCP with port specification");
range.flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
@@ -142,6 +142,8 @@ static int DNAT_parse(int c, char **argv, int invert, unsigned int *flags,
if (entry->ip.proto == IPPROTO_TCP
|| entry->ip.proto == IPPROTO_UDP
+ || entry->ip.proto == IPPROTO_SCTP
+ || entry->ip.proto == IPPROTO_DCCP
|| entry->ip.proto == IPPROTO_ICMP)
portok = 1;
else
diff --git a/extensions/libipt_MASQUERADE.c b/extensions/libipt_MASQUERADE.c
index 76707651..32410c09 100644
--- a/extensions/libipt_MASQUERADE.c
+++ b/extensions/libipt_MASQUERADE.c
@@ -77,6 +77,8 @@ static int MASQUERADE_parse(int c, char **argv, int invert, unsigned int *flags,
if (entry->ip.proto == IPPROTO_TCP
|| entry->ip.proto == IPPROTO_UDP
+ || entry->ip.proto == IPPROTO_SCTP
+ || entry->ip.proto == IPPROTO_DCCP
|| entry->ip.proto == IPPROTO_ICMP)
portok = 1;
else
@@ -86,7 +88,7 @@ static int MASQUERADE_parse(int c, char **argv, int invert, unsigned int *flags,
case '1':
if (!portok)
exit_error(PARAMETER_PROBLEM,
- "Need TCP or UDP with port specification");
+ "Need TCP, UDP, SCTP or DCCP with port specification");
if (check_inverse(optarg, &invert, NULL, 0))
exit_error(PARAMETER_PROBLEM,
diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c
index ffef3bf8..e30c1392 100644
--- a/extensions/libipt_REDIRECT.c
+++ b/extensions/libipt_REDIRECT.c
@@ -84,6 +84,8 @@ static int REDIRECT_parse(int c, char **argv, int invert, unsigned int *flags,
if (entry->ip.proto == IPPROTO_TCP
|| entry->ip.proto == IPPROTO_UDP
+ || entry->ip.proto == IPPROTO_SCTP
+ || entry->ip.proto == IPPROTO_DCCP
|| entry->ip.proto == IPPROTO_ICMP)
portok = 1;
else
@@ -93,7 +95,7 @@ static int REDIRECT_parse(int c, char **argv, int invert, unsigned int *flags,
case '1':
if (!portok)
exit_error(PARAMETER_PROBLEM,
- "Need TCP or UDP with port specification");
+ "Need TCP, UDP, SCTP or DCCP with port specification");
if (check_inverse(optarg, &invert, NULL, 0))
exit_error(PARAMETER_PROBLEM,
diff --git a/extensions/libipt_SNAT.c b/extensions/libipt_SNAT.c
index b2a4925f..7d04761b 100644
--- a/extensions/libipt_SNAT.c
+++ b/extensions/libipt_SNAT.c
@@ -69,7 +69,7 @@ parse_to(char *arg, int portok, struct ipt_natinfo *info)
if (!portok)
exit_error(PARAMETER_PROBLEM,
- "Need TCP or UDP with port specification");
+ "Need TCP, UDP, SCTP or DCCP with port specification");
range.flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
@@ -142,6 +142,8 @@ static int SNAT_parse(int c, char **argv, int invert, unsigned int *flags,
if (entry->ip.proto == IPPROTO_TCP
|| entry->ip.proto == IPPROTO_UDP
+ || entry->ip.proto == IPPROTO_SCTP
+ || entry->ip.proto == IPPROTO_DCCP
|| entry->ip.proto == IPPROTO_ICMP)
portok = 1;
else