projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[powerpc.git]
/
net
/
ipv4
/
netfilter
/
ipt_TCPMSS.c
diff --git
a/net/ipv4/netfilter/ipt_TCPMSS.c
b/net/ipv4/netfilter/ipt_TCPMSS.c
index
c122841
..
ef2fe5b
100644
(file)
--- a/
net/ipv4/netfilter/ipt_TCPMSS.c
+++ b/
net/ipv4/netfilter/ipt_TCPMSS.c
@@
-48,6
+48,7
@@
ipt_tcpmss_target(struct sk_buff **pskb,
const struct net_device *in,
const struct net_device *out,
unsigned int hooknum,
const struct net_device *in,
const struct net_device *out,
unsigned int hooknum,
+ const struct xt_target *target,
const void *targinfo,
void *userinfo)
{
const void *targinfo,
void *userinfo)
{
@@
-211,6
+212,7
@@
static inline int find_syn_match(const struct ipt_entry_match *m)
static int
ipt_tcpmss_checkentry(const char *tablename,
const void *e_void,
static int
ipt_tcpmss_checkentry(const char *tablename,
const void *e_void,
+ const struct xt_target *target,
void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask)
void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask)
@@
-218,13
+220,6
@@
ipt_tcpmss_checkentry(const char *tablename,
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
const struct ipt_entry *e = e_void;
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
const struct ipt_entry *e = e_void;
- if (targinfosize != IPT_ALIGN(sizeof(struct ipt_tcpmss_info))) {
- DEBUGP("ipt_tcpmss_checkentry: targinfosize %u != %u\n",
- targinfosize, IPT_ALIGN(sizeof(struct ipt_tcpmss_info)));
- return 0;
- }
-
-
if((tcpmssinfo->mss == IPT_TCPMSS_CLAMP_PMTU) &&
((hook_mask & ~((1 << NF_IP_FORWARD)
| (1 << NF_IP_LOCAL_OUT)
if((tcpmssinfo->mss == IPT_TCPMSS_CLAMP_PMTU) &&
((hook_mask & ~((1 << NF_IP_FORWARD)
| (1 << NF_IP_LOCAL_OUT)
@@
-233,11
+228,8
@@
ipt_tcpmss_checkentry(const char *tablename,
return 0;
}
return 0;
}
- if (e->ip.proto == IPPROTO_TCP
- && !(e->ip.invflags & IPT_INV_PROTO)
- && IPT_MATCH_ITERATE(e, find_syn_match))
+ if (IPT_MATCH_ITERATE(e, find_syn_match))
return 1;
return 1;
-
printk("TCPMSS: Only works on TCP SYN packets\n");
return 0;
}
printk("TCPMSS: Only works on TCP SYN packets\n");
return 0;
}
@@
-245,19
+237,21
@@
ipt_tcpmss_checkentry(const char *tablename,
static struct ipt_target ipt_tcpmss_reg = {
.name = "TCPMSS",
.target = ipt_tcpmss_target,
static struct ipt_target ipt_tcpmss_reg = {
.name = "TCPMSS",
.target = ipt_tcpmss_target,
+ .targetsize = sizeof(struct ipt_tcpmss_info),
+ .proto = IPPROTO_TCP,
.checkentry = ipt_tcpmss_checkentry,
.me = THIS_MODULE,
};
.checkentry = ipt_tcpmss_checkentry,
.me = THIS_MODULE,
};
-static int __init init(void)
+static int __init i
pt_tcpmss_i
nit(void)
{
return ipt_register_target(&ipt_tcpmss_reg);
}
{
return ipt_register_target(&ipt_tcpmss_reg);
}
-static void __exit fini(void)
+static void __exit
ipt_tcpmss_
fini(void)
{
ipt_unregister_target(&ipt_tcpmss_reg);
}
{
ipt_unregister_target(&ipt_tcpmss_reg);
}
-module_init(init);
-module_exit(fini);
+module_init(i
pt_tcpmss_i
nit);
+module_exit(
ipt_tcpmss_
fini);