git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETFILTER]: x_tables: switch hotdrop to bool
[safe/jmp/linux-2.6]
/
net
/
netfilter
/
xt_multiport.c
diff --git
a/net/netfilter/xt_multiport.c
b/net/netfilter/xt_multiport.c
index
e74f9bb
..
1dc53de
100644
(file)
--- a/
net/netfilter/xt_multiport.c
+++ b/
net/netfilter/xt_multiport.c
@@
-1,5
+1,5
@@
-/* 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. */
+/* Kernel module to match one of a list of TCP/UDP
(-Lite)/SCTP/DCCP ports:
+
ports are in
the same place so we can treat them as equal. */
/* (C) 1999-2001 Paul `Rusty' Russell
* (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
/* (C) 1999-2001 Paul `Rusty' Russell
* (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
@@
-91,7
+91,7
@@
ports_match_v1(const struct xt_multiport_v1 *minfo,
}
}
}
}
- return minfo->invert;
+ return minfo->invert;
}
static int
}
static int
@@
-102,9
+102,9
@@
match(const struct sk_buff *skb,
const void *matchinfo,
int offset,
unsigned int protoff,
const void *matchinfo,
int offset,
unsigned int protoff,
-
int
*hotdrop)
+
bool
*hotdrop)
{
{
-
u
16 _ports[2], *pptr;
+
__be
16 _ports[2], *pptr;
const struct xt_multiport *multiinfo = matchinfo;
if (offset)
const struct xt_multiport *multiinfo = matchinfo;
if (offset)
@@
-116,7
+116,7
@@
match(const struct sk_buff *skb,
* can't. Hence, no choice but to drop.
*/
duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
* can't. Hence, no choice but to drop.
*/
duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
- *hotdrop =
1
;
+ *hotdrop =
true
;
return 0;
}
return 0;
}
@@
-133,9
+133,9
@@
match_v1(const struct sk_buff *skb,
const void *matchinfo,
int offset,
unsigned int protoff,
const void *matchinfo,
int offset,
unsigned int protoff,
-
int
*hotdrop)
+
bool
*hotdrop)
{
{
-
u
16 _ports[2], *pptr;
+
__be
16 _ports[2], *pptr;
const struct xt_multiport_v1 *multiinfo = matchinfo;
if (offset)
const struct xt_multiport_v1 *multiinfo = matchinfo;
if (offset)
@@
-147,7
+147,7
@@
match_v1(const struct sk_buff *skb,
* can't. Hence, no choice but to drop.
*/
duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
* can't. Hence, no choice but to drop.
*/
duprintf("xt_multiport: Dropping evil offset=0 tinygram.\n");
- *hotdrop =
1
;
+ *hotdrop =
true
;
return 0;
}
return 0;
}
@@
-162,6
+162,7
@@
check(u_int16_t proto,
{
/* Must specify supported protocol, 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_UDPLITE
|| proto == IPPROTO_SCTP || proto == IPPROTO_DCCP)
&& !(ip_invflags & XT_INV_PROTO)
&& (match_flags == XT_MULTIPORT_SOURCE
|| proto == IPPROTO_SCTP || proto == IPPROTO_DCCP)
&& !(ip_invflags & XT_INV_PROTO)
&& (match_flags == XT_MULTIPORT_SOURCE
@@
-176,7
+177,6
@@
checkentry(const char *tablename,
const void *info,
const struct xt_match *match,
void *matchinfo,
const void *info,
const struct xt_match *match,
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
const struct ipt_ip *ip = info;
unsigned int hook_mask)
{
const struct ipt_ip *ip = info;
@@
-191,7
+191,6
@@
checkentry_v1(const char *tablename,
const void *info,
const struct xt_match *match,
void *matchinfo,
const void *info,
const struct xt_match *match,
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
const struct ipt_ip *ip = info;
unsigned int hook_mask)
{
const struct ipt_ip *ip = info;
@@
-206,7
+205,6
@@
checkentry6(const char *tablename,
const void *info,
const struct xt_match *match,
void *matchinfo,
const void *info,
const struct xt_match *match,
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
const struct ip6t_ip6 *ip = info;
unsigned int hook_mask)
{
const struct ip6t_ip6 *ip = info;
@@
-221,7
+219,6
@@
checkentry6_v1(const char *tablename,
const void *info,
const struct xt_match *match,
void *matchinfo,
const void *info,
const struct xt_match *match,
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
const struct ip6t_ip6 *ip = info;
unsigned int hook_mask)
{
const struct ip6t_ip6 *ip = info;