From 5a942f9501f7ce287e1c37c553eb02a1e269e081 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 4 Nov 2008 13:22:40 +0100 Subject: Add SCTP/DCCP support to NAT targets Signed-off-by: Patrick McHardy --- extensions/libipt_DNAT.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extensions/libipt_DNAT.c') 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 -- cgit v1.2.3