Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / net / netfilter / xt_multiport.c
index b56cd2b..1ff0a25 100644 (file)
@@ -1,4 +1,4 @@
-/* Kernel module to match one of a list of TCP/UDP ports: ports are in
+/* Kernel module to match one of a list of TCP/UDP/SCTP/DCCP ports: ports are in
    the same place so we can treat them as equal. */
 
 /* (C) 1999-2001 Paul `Rusty' Russell
@@ -160,8 +160,9 @@ check(u_int16_t proto,
       u_int8_t match_flags,
       u_int8_t count)
 {
-       /* Must specify proto == TCP/UDP, no unknown flags or bad count */
-       return (proto == IPPROTO_TCP || proto == IPPROTO_UDP)
+       /* Must specify supported protocol, no unknown flags or bad count */
+       return (proto == IPPROTO_TCP || proto == IPPROTO_UDP
+               || proto == IPPROTO_SCTP || proto == IPPROTO_DCCP)
                && !(ip_invflags & XT_INV_PROTO)
                && (match_flags == XT_MULTIPORT_SOURCE
                    || match_flags == XT_MULTIPORT_DESTINATION