[EBTABLES]: Handle SCTP/DCCP in ebt_{ip,log}
authorPatrick McHardy <kaber@trash.net>
Tue, 17 Jan 2006 21:01:31 +0000 (13:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Jan 2006 21:01:31 +0000 (13:01 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebt_ip.c
net/bridge/netfilter/ebt_log.c

index f158fe67dd605fd8ca3dd5b941df04147d0d277f..dc5d0b2427cf4c359aa0eb961b9108808db8cfbc 100644 (file)
@@ -92,7 +92,9 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
                if (info->invflags & EBT_IP_PROTO)
                        return -EINVAL;
                if (info->protocol != IPPROTO_TCP &&
-                   info->protocol != IPPROTO_UDP)
+                   info->protocol != IPPROTO_UDP &&
+                   info->protocol != IPPROTO_SCTP &&
+                   info->protocol != IPPROTO_DCCP)
                         return -EINVAL;
        }
        if (info->bitmask & EBT_IP_DPORT && info->dport[0] > info->dport[1])
index a29c1232c4204e5a66c45e251039c14575930c97..0128fbbe23281241d2929ab9ffd6eb74d71d67d9 100644 (file)
@@ -95,7 +95,9 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
                       "tos=0x%02X, IP proto=%d", NIPQUAD(ih->saddr),
                       NIPQUAD(ih->daddr), ih->tos, ih->protocol);
                if (ih->protocol == IPPROTO_TCP ||
-                   ih->protocol == IPPROTO_UDP) {
+                   ih->protocol == IPPROTO_UDP ||
+                   ih->protocol == IPPROTO_SCTP ||
+                   ih->protocol == IPPROTO_DCCP) {
                        struct tcpudphdr _ports, *pptr;
 
                        pptr = skb_header_pointer(skb, ih->ihl*4,