X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=net%2Fipv4%2Fnetfilter%2Fipt_TTL.c;h=a991ec7bd4e7207e9c7a15c937ca60fac1fa6a51;hb=967b05f64e27d04a4c8879addd0e1c52137e2c9e;hp=fffe5ca82e915d472c2a4d63c32192b1d968b546;hpb=43bc0ca7eadc024e9e5b935fa5e0892df4fec9eb;p=linux-2.6-omap-h63xx.git diff --git a/net/ipv4/netfilter/ipt_TTL.c b/net/ipv4/netfilter/ipt_TTL.c index fffe5ca82e9..a991ec7bd4e 100644 --- a/net/ipv4/netfilter/ipt_TTL.c +++ b/net/ipv4/netfilter/ipt_TTL.c @@ -12,14 +12,14 @@ #include #include -#include +#include #include MODULE_AUTHOR("Harald Welte "); MODULE_DESCRIPTION("IP tables TTL modification module"); MODULE_LICENSE("GPL"); -static unsigned int +static unsigned int ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, unsigned int hooknum, const struct xt_target *target, @@ -32,7 +32,7 @@ ipt_ttl_target(struct sk_buff **pskb, if (!skb_make_writable(pskb, (*pskb)->len)) return NF_DROP; - iph = (*pskb)->nh.iph; + iph = ip_hdr(*pskb); switch (info->mode) { case IPT_TTL_SET: @@ -59,7 +59,7 @@ ipt_ttl_target(struct sk_buff **pskb, iph->ttl = new_ttl; } - return IPT_CONTINUE; + return XT_CONTINUE; } static int ipt_ttl_checkentry(const char *tablename, @@ -71,7 +71,7 @@ static int ipt_ttl_checkentry(const char *tablename, struct ipt_TTL_info *info = targinfo; if (info->mode > IPT_TTL_MAXMODE) { - printk(KERN_WARNING "ipt_TTL: invalid or unknown Mode %u\n", + printk(KERN_WARNING "ipt_TTL: invalid or unknown Mode %u\n", info->mode); return 0; } @@ -80,23 +80,24 @@ static int ipt_ttl_checkentry(const char *tablename, return 1; } -static struct ipt_target ipt_TTL = { +static struct xt_target ipt_TTL = { .name = "TTL", - .target = ipt_ttl_target, + .family = AF_INET, + .target = ipt_ttl_target, .targetsize = sizeof(struct ipt_TTL_info), .table = "mangle", - .checkentry = ipt_ttl_checkentry, + .checkentry = ipt_ttl_checkentry, .me = THIS_MODULE, }; static int __init ipt_ttl_init(void) { - return ipt_register_target(&ipt_TTL); + return xt_register_target(&ipt_TTL); } static void __exit ipt_ttl_fini(void) { - ipt_unregister_target(&ipt_TTL); + xt_unregister_target(&ipt_TTL); } module_init(ipt_ttl_init);