diff options
Diffstat (limited to 'extensions/libipt_multiport.c')
-rw-r--r-- | extensions/libipt_multiport.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/extensions/libipt_multiport.c b/extensions/libipt_multiport.c index 2a10abd4..694d69d4 100644 --- a/extensions/libipt_multiport.c +++ b/extensions/libipt_multiport.c @@ -5,6 +5,7 @@ #include <stdlib.h> #include <getopt.h> #include <iptables.h> +#include <netinet/in.h> /* To ensure that iptables compiles with an old kernel */ #include "../include/linux/netfilter_ipv4/ipt_multiport.h" @@ -59,6 +60,8 @@ proto_to_name(u_int8_t proto) return "tcp"; case IPPROTO_UDP: return "udp"; + case IPPROTO_UDPLITE: + return "udplite"; case IPPROTO_SCTP: return "sctp"; case IPPROTO_DCCP: @@ -141,16 +144,17 @@ check_proto(const struct ipt_entry *entry) if (entry->ip.invflags & IPT_INV_PROTO) exit_error(PARAMETER_PROBLEM, - "multiport only works with TCP or UDP"); + "multiport only works with TCP, UDP, UDPLITE, SCTP and DCCP"); if ((proto = proto_to_name(entry->ip.proto)) != NULL) return proto; else if (!entry->ip.proto) exit_error(PARAMETER_PROBLEM, - "multiport needs `-p tcp', `-p udp', `-p sctp' or `-p dccp'"); + "multiport needs `-p tcp', `-p udp', `-p udplite', " + "`-p sctp' or `-p dccp'"); else exit_error(PARAMETER_PROBLEM, - "multiport only works with TCP, UDP, SCTP and DCCP"); + "multiport only works with TCP, UDP, UDPLITE, SCTP and DCCP"); } /* Function which parses command options; returns true if it @@ -457,7 +461,7 @@ static struct iptables_match multiport_v1 = { }; void -_init(void) +ipt_multiport_init(void) { register_match(&multiport); register_match(&multiport_v1); |