]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Add UDPLITE multiport support
authorPatrick McHardy <kaber@trash.net>
Thu, 11 Jan 2007 09:08:22 +0000 (09:08 +0000)
committerPatrick McHardy <kaber@trash.net>
Thu, 11 Jan 2007 09:08:22 +0000 (09:08 +0000)
extensions/libipt_multiport.c
include/ip6tables.h
include/iptables.h
ip6tables.c
iptables.c

index 2a10abd4f3a2f35048600fb856012b3d8e7d4bc2..58b6a0eb1ad923678c92aaa4d7da210c3f2f7522 100644 (file)
@@ -59,6 +59,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 +143,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
index 7907f66b4680af576da44ab008aa18b0f223431b..f8f709bced905d6b3403843261b73f06a13e3e07 100644 (file)
@@ -14,6 +14,9 @@
 #ifndef IPPROTO_DCCP
 #define IPPROTO_DCCP 33
 #endif
+#ifndef IPPROTO_UDPLITE
+#define IPPROTO_UDPLITE 136
+#endif
 
 #ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
 #define IP6T_SO_GET_REVISION_MATCH     68
index 6b3b956ad81296bec5fb05713dff0c01a834c6ed..cd514284c5ec6f362d58eacf2fb4a68dc9c07fc6 100644 (file)
@@ -14,6 +14,9 @@
 #ifndef IPPROTO_DCCP
 #define IPPROTO_DCCP 33
 #endif
+#ifndef IPPROTO_UDPLITE
+#define IPPROTO_UDPLITE        136
+#endif
 
 #ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
 #define IPT_SO_GET_REVISION_MATCH      (IPT_BASE_CTL + 2)
index 9b1370a455086acb30cc2dcfe0662667d8f0a131..211b81a7c8ccb8aca89608d913d6b40250725d91 100644 (file)
@@ -223,6 +223,7 @@ struct pprot {
 static const struct pprot chain_protos[] = {
        { "tcp", IPPROTO_TCP },
        { "udp", IPPROTO_UDP },
+       { "udplite", IPPROTO_UDPLITE },
        { "icmpv6", IPPROTO_ICMPV6 },
        { "ipv6-icmp", IPPROTO_ICMPV6 },
        { "esp", IPPROTO_ESP },
index 7d8771d0b44343ae50e7d331ef63418df3e6ad6f..d4aa26fd54019daa435399d18d217704c3380ab3 100644 (file)
@@ -227,6 +227,7 @@ struct pprot {
 static const struct pprot chain_protos[] = {
        { "tcp", IPPROTO_TCP },
        { "udp", IPPROTO_UDP },
+       { "udplite", IPPROTO_UDPLITE },
        { "icmp", IPPROTO_ICMP },
        { "esp", IPPROTO_ESP },
        { "ah", IPPROTO_AH },