[netfilter-cvslog] r3242 -
trunk/patch-o-matic-ng/hashlimit/linux-2.6/net/ipv4/netfilter
/C=DE/ST=Berlin/L=Berlin/O=Netfilter
/C=DE/ST=Berlin/L=Berlin/O=Netfilter
Wed Oct 20 16:58:20 CEST 2004
Author: /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge at netfilter.org
Date: 2004-10-20 16:58:20 +0200 (Wed, 20 Oct 2004)
New Revision: 3242
Modified:
trunk/patch-o-matic-ng/hashlimit/linux-2.6/net/ipv4/netfilter/ipt_hashlimit.c
Log:
fix some compilation errors/warnings
Modified: trunk/patch-o-matic-ng/hashlimit/linux-2.6/net/ipv4/netfilter/ipt_hashlimit.c
===================================================================
--- trunk/patch-o-matic-ng/hashlimit/linux-2.6/net/ipv4/netfilter/ipt_hashlimit.c 2004-10-20 14:52:06 UTC (rev 3241)
+++ trunk/patch-o-matic-ng/hashlimit/linux-2.6/net/ipv4/netfilter/ipt_hashlimit.c 2004-10-20 14:58:20 UTC (rev 3242)
@@ -30,6 +30,7 @@
#include <linux/vmalloc.h>
#include <linux/tcp.h>
#include <linux/udp.h>
+#include <linux/sctp.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
@@ -377,7 +378,8 @@
dh->rateinfo.credit = dh->rateinfo.credit_cap;
}
-static inline int get_ports(struct sk_buff *skb, int offset, u16 ports[2])
+static inline int get_ports(const struct sk_buff *skb, int offset,
+ u16 ports[2])
{
union {
struct tcphdr th;
@@ -405,16 +407,16 @@
switch (skb->nh.iph->protocol) {
case IPPROTO_TCP:
- ports[0] = ptr_u.th->source;
- ports[1] = ptr_u.th->dest;
+ ports[0] = ptr_u->th.source;
+ ports[1] = ptr_u->th.dest;
break;
case IPPROTO_UDP:
- ports[0] = ptr_u.uh->source;
- ports[1] = ptr_u.uh->dest;
+ ports[0] = ptr_u->uh.source;
+ ports[1] = ptr_u->uh.dest;
break;
case IPPROTO_SCTP:
- ports[0] = ptr_u.sctph->source;
- ports[1] = ptr_u.sctph->dest;
+ ports[0] = ptr_u->sctph.source;
+ ports[1] = ptr_u->sctph.dest;
break;
default:
/* all other protocols don't supprot per-port hash
@@ -456,7 +458,7 @@
/* ports only if respective mode */
if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_DPT
||hinfo->cfg.mode & IPT_HASHLIMIT_HASH_SPT) {
- if (get_ports(skb, offset, &dst.src_port)) {
+ if (get_ports(skb, offset, (u_int16_t *)&dst.src_port)) {
/* We've been asked to examine this packet, and we
can't. Hence, no choice but to drop. */
*hotdrop = 1;
@@ -625,7 +627,7 @@
return seq_printf(s, "%ld %u.%u.%u.%u:%u->%u.%u.%u.%u:%u %u %u %u\n",
(ent->expires - jiffies)/HZ,
- NIPQUAD(ent->dst.src_ip), ntohs(ent->dst.src_port)
+ NIPQUAD(ent->dst.src_ip), ntohs(ent->dst.src_port),
NIPQUAD(ent->dst.dst_ip), ntohs(ent->dst.dst_port),
ent->rateinfo.credit, ent->rateinfo.credit_cap,
ent->rateinfo.cost);
More information about the netfilter-cvslog
mailing list