~ubuntu-branches/debian/lenny/netfilter-extensions/lenny

« back to all changes in this revision

Viewing changes to debian/patches/10_IPV4OPTSSTRIP_compile.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Robert S. Edmonds
  • Date: 2008-07-19 20:44:40 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080719204440-n8i2f0qiu48c6s36
Tags: 20080719+debian-1
2.6.25 compile fixes; closes: #481300.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 10_IPV4OPTSSTRIP_compile.dpatch by Robert S. Edmonds <edmonds@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: compile fixes for 2.6.21
6
 
 
7
 
@DPATCH@
8
 
diff -urNad netfilter-extensions-20070520+debian~/net/ipv4/netfilter/ipt_IPV4OPTSSTRIP.c netfilter-extensions-20070520+debian/net/ipv4/netfilter/ipt_IPV4OPTSSTRIP.c
9
 
--- netfilter-extensions-20070520+debian~/net/ipv4/netfilter/ipt_IPV4OPTSSTRIP.c        2007-05-22 00:05:30.000000000 -0400
10
 
+++ netfilter-extensions-20070520+debian/net/ipv4/netfilter/ipt_IPV4OPTSSTRIP.c 2007-05-22 00:08:27.000000000 -0400
11
 
@@ -21,8 +21,8 @@
12
 
        const struct net_device *in,
13
 
        const struct net_device *out,
14
 
        unsigned int hooknum,
15
 
-       const void *targinfo,
16
 
-       void *userinfo)
17
 
+       const struct xt_target *target,
18
 
+       const void *targinfo)
19
 
 {
20
 
        struct iphdr *iph;
21
 
        struct sk_buff *skb;
22
 
@@ -30,7 +30,7 @@
23
 
        unsigned char *optiph;
24
 
        int l;
25
 
        
26
 
-       if (!skb_ip_make_writable(pskb, (*pskb)->len))
27
 
+       if (!skb_make_writable(pskb, (*pskb)->len))
28
 
                return NF_DROP;
29
 
  
30
 
        skb = (*pskb);
31
 
@@ -54,9 +54,9 @@
32
 
 
33
 
 static int
34
 
 checkentry(const char *tablename,
35
 
-          const struct ipt_entry *e,
36
 
+          const void *e,
37
 
+          const struct xt_target *target,
38
 
            void *targinfo,
39
 
-           unsigned int targinfosize,
40
 
            unsigned int hook_mask)
41
 
 {
42
 
        if (strcmp(tablename, "mangle")) {
43
 
@@ -67,20 +67,21 @@
44
 
        return 1;
45
 
 }
46
 
 
47
 
-static struct ipt_target ipt_ipv4optsstrip_reg = { 
48
 
+static struct xt_target ipt_ipv4optsstrip_reg = { 
49
 
        .name = "IPV4OPTSSTRIP",
50
 
+       .family = AF_INET,
51
 
        .target = target,
52
 
        .checkentry = checkentry,
53
 
        .me = THIS_MODULE };
54
 
 
55
 
 static int __init init(void)
56
 
 {
57
 
-       return ipt_register_target(&ipt_ipv4optsstrip_reg);
58
 
+       return xt_register_target(&ipt_ipv4optsstrip_reg);
59
 
 }
60
 
 
61
 
 static void __exit fini(void)
62
 
 {
63
 
-       ipt_unregister_target(&ipt_ipv4optsstrip_reg);
64
 
+       xt_unregister_target(&ipt_ipv4optsstrip_reg);
65
 
 }
66
 
 
67
 
 module_init(init);