[IPVS]: Replace local version of skb_make_writable
[pandora-kernel.git] / net / ipv4 / ipvs / ip_vs_ftp.c
index 847c47a..4167d41 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/skbuff.h>
 #include <linux/in.h>
 #include <linux/ip.h>
+#include <linux/netfilter.h>
 #include <net/protocol.h>
 #include <net/tcp.h>
 #include <asm/unaligned.h>
@@ -155,14 +156,14 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
                return 1;
 
        /* Linear packets are much easier to deal with. */
-       if (!ip_vs_make_skb_writable(pskb, (*pskb)->len))
+       if (!skb_make_writable(*pskb, (*pskb)->len))
                return 0;
 
        if (cp->app_data == &ip_vs_ftp_pasv) {
-               iph = (*pskb)->nh.iph;
+               iph = ip_hdr(*pskb);
                th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
                data = (char *)th + (th->doff << 2);
-               data_limit = (*pskb)->tail;
+               data_limit = skb_tail_pointer(*pskb);
 
                if (ip_vs_ftp_get_addrport(data, data_limit,
                                           SERVER_STRING,
@@ -256,20 +257,20 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
                return 1;
 
        /* Linear packets are much easier to deal with. */
-       if (!ip_vs_make_skb_writable(pskb, (*pskb)->len))
+       if (!skb_make_writable(*pskb, (*pskb)->len))
                return 0;
 
        /*
         * Detecting whether it is passive
         */
-       iph = (*pskb)->nh.iph;
+       iph = ip_hdr(*pskb);
        th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
 
        /* Since there may be OPTIONS in the TCP packet and the HLEN is
           the length of the header in 32-bit multiples, it is accurate
           to calculate data address by th+HLEN*4 */
        data = data_start = (char *)th + (th->doff << 2);
-       data_limit = (*pskb)->tail;
+       data_limit = skb_tail_pointer(*pskb);
 
        while (data <= data_limit - 6) {
                if (strnicmp(data, "PASV\r\n", 6) == 0) {