Pull thermal into release branch
[powerpc.git] / net / ipv4 / ipvs / ip_vs_app.c
index 341474e..664cb8e 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/skbuff.h>
 #include <linux/in.h>
 #include <linux/ip.h>
+#include <linux/netfilter.h>
 #include <net/net_namespace.h>
 #include <net/protocol.h>
 #include <net/tcp.h>
@@ -328,18 +329,18 @@ static inline void vs_seq_update(struct ip_vs_conn *cp, struct ip_vs_seq *vseq,
        spin_unlock(&cp->lock);
 }
 
-static inline int app_tcp_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb,
+static inline int app_tcp_pkt_out(struct ip_vs_conn *cp, struct sk_buff *skb,
                                  struct ip_vs_app *app)
 {
        int diff;
-       const unsigned int tcp_offset = ip_hdrlen(*pskb);
+       const unsigned int tcp_offset = ip_hdrlen(skb);
        struct tcphdr *th;
        __u32 seq;
 
-       if (!ip_vs_make_skb_writable(pskb, tcp_offset + sizeof(*th)))
+       if (!skb_make_writable(skb, tcp_offset + sizeof(*th)))
                return 0;
 
-       th = (struct tcphdr *)(skb_network_header(*pskb) + tcp_offset);
+       th = (struct tcphdr *)(skb_network_header(skb) + tcp_offset);
 
        /*
         *      Remember seq number in case this pkt gets resized
@@ -360,7 +361,7 @@ static inline int app_tcp_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb,
        if (app->pkt_out == NULL)
                return 1;
 
-       if (!app->pkt_out(app, cp, pskb, &diff))
+       if (!app->pkt_out(app, cp, skb, &diff))
                return 0;
 
        /*
@@ -378,7 +379,7 @@ static inline int app_tcp_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb,
  *     called by ipvs packet handler, assumes previously checked cp!=NULL
  *     returns false if it can't handle packet (oom)
  */
-int ip_vs_app_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb)
+int ip_vs_app_pkt_out(struct ip_vs_conn *cp, struct sk_buff *skb)
 {
        struct ip_vs_app *app;
 
@@ -391,7 +392,7 @@ int ip_vs_app_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb)
 
        /* TCP is complicated */
        if (cp->protocol == IPPROTO_TCP)
-               return app_tcp_pkt_out(cp, pskb, app);
+               return app_tcp_pkt_out(cp, skb, app);
 
        /*
         *      Call private output hook function
@@ -399,22 +400,22 @@ int ip_vs_app_pkt_out(struct ip_vs_conn *cp, struct sk_buff **pskb)
        if (app->pkt_out == NULL)
                return 1;
 
-       return app->pkt_out(app, cp, pskb, NULL);
+       return app->pkt_out(app, cp, skb, NULL);
 }
 
 
-static inline int app_tcp_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb,
+static inline int app_tcp_pkt_in(struct ip_vs_conn *cp, struct sk_buff *skb,
                                 struct ip_vs_app *app)
 {
        int diff;
-       const unsigned int tcp_offset = ip_hdrlen(*pskb);
+       const unsigned int tcp_offset = ip_hdrlen(skb);
        struct tcphdr *th;
        __u32 seq;
 
-       if (!ip_vs_make_skb_writable(pskb, tcp_offset + sizeof(*th)))
+       if (!skb_make_writable(skb, tcp_offset + sizeof(*th)))
                return 0;
 
-       th = (struct tcphdr *)(skb_network_header(*pskb) + tcp_offset);
+       th = (struct tcphdr *)(skb_network_header(skb) + tcp_offset);
 
        /*
         *      Remember seq number in case this pkt gets resized
@@ -435,7 +436,7 @@ static inline int app_tcp_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb,
        if (app->pkt_in == NULL)
                return 1;
 
-       if (!app->pkt_in(app, cp, pskb, &diff))
+       if (!app->pkt_in(app, cp, skb, &diff))
                return 0;
 
        /*
@@ -453,7 +454,7 @@ static inline int app_tcp_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb,
  *     called by ipvs packet handler, assumes previously checked cp!=NULL.
  *     returns false if can't handle packet (oom).
  */
-int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb)
+int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff *skb)
 {
        struct ip_vs_app *app;
 
@@ -466,7 +467,7 @@ int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb)
 
        /* TCP is complicated */
        if (cp->protocol == IPPROTO_TCP)
-               return app_tcp_pkt_in(cp, pskb, app);
+               return app_tcp_pkt_in(cp, skb, app);
 
        /*
         *      Call private input hook function
@@ -474,7 +475,7 @@ int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff **pskb)
        if (app->pkt_in == NULL)
                return 1;
 
-       return app->pkt_in(app, cp, pskb, NULL);
+       return app->pkt_in(app, cp, skb, NULL);
 }