[PATCH] ip_vs: fixed compile warning by repl. skb_linearize with __skb_linearize [2.6.0-test2]

From: Daniele Bellucci (bellucda@tiscali.it)
Date: Mon Jul 28 2003 - 12:43:34 EST


make output:
....
net/ipv4/ipvs/ip_vs_core.c: In function `ip_vs_out_icmp':
net/ipv4/ipvs/ip_vs_core.c:528: warning: `skb_linearize' is deprecated (declared at include/linux/skbuff.h:1129)
net/ipv4/ipvs/ip_vs_core.c: In function `ip_vs_out':
net/ipv4/ipvs/ip_vs_core.c:728: warning: `skb_linearize' is deprecated (declared at include/linux/skbuff.h:1129)
net/ipv4/ipvs/ip_vs_core.c: In function `ip_vs_in_icmp':
net/ipv4/ipvs/ip_vs_core.c:818: warning: `skb_linearize' is deprecated (declared at include/linux/skbuff.h:1129)
net/ipv4/ipvs/ip_vs_xmit.c: In function `ip_vs_nat_xmit':
net/ipv4/ipvs/ip_vs_xmit.c:269: warning: `skb_linearize' is deprecated (declared at include/linux/skbuff.h:1129)
....

The following fix compile warning and should works fine too (skb_linearize is an "alias" of __skb_linearize)
Please tellme if i'm wrong or not.

Tnx.

diff -urN 1.0/net/ipv4/ipvs/ip_vs_core.c 1.1/net/ipv4/ipvs/ip_vs_core.c
--- 1.0/net/ipv4/ipvs/ip_vs_core.c 2003-07-28 19:22:15.000000000 +0200
+++ 1.1/net/ipv4/ipvs/ip_vs_core.c 2003-07-28 19:27:41.000000000 +0200
@@ -22,6 +22,9 @@
  *
  * Changes:
  *
+ * 28 Jul. 2003 Daniele Bellucci <bellucda@tiscali.it>
+ * Replaced skb_linearize in __skb_linearize.
+ *
  */
 
 #include <linux/config.h>
@@ -525,7 +528,7 @@
         }
 
         if (skb_is_nonlinear(skb)) {
- if (skb_linearize(skb, GFP_ATOMIC) != 0)
+ if (__skb_linearize(skb, GFP_ATOMIC) != 0)
                         return NF_DROP;
                 ip_send_check(skb->nh.iph);
         }
@@ -725,7 +728,7 @@
          */
 
         if (unlikely(cp->app && !pp->slave && skb_is_nonlinear(skb))) {
- if (skb_linearize(skb, GFP_ATOMIC) != 0) {
+ if (__skb_linearize(skb, GFP_ATOMIC) != 0) {
                         ip_vs_conn_put(cp);
                         return NF_DROP;
                 }
@@ -815,7 +818,7 @@
 
         *related = 1;
         if (skb_is_nonlinear(skb)) {
- if (skb_linearize(skb, GFP_ATOMIC) != 0)
+ if (__skb_linearize(skb, GFP_ATOMIC) != 0)
                         return NF_DROP;
                 ip_send_check(skb->nh.iph);
         }
diff -urN 1.0/net/ipv4/ipvs/ip_vs_xmit.c 1.1/net/ipv4/ipvs/ip_vs_xmit.c
--- 1.0/net/ipv4/ipvs/ip_vs_xmit.c 2003-07-28 19:22:26.000000000 +0200
+++ 1.1/net/ipv4/ipvs/ip_vs_xmit.c 2003-07-28 19:27:45.000000000 +0200
@@ -13,6 +13,9 @@
  *
  * Changes:
  *
+ * 28 Jul. 2003 Daniele Bellucci <bellucda@tiscali.it>
+ * Replaced skb_linearize in __skb_linearize
+ *
  */
 
 #include <linux/config.h>
@@ -266,7 +269,7 @@
 
         if (unlikely(cp->app && !pp->slave)) {
                 if (skb_is_nonlinear(skb) &&
- skb_linearize(skb, GFP_ATOMIC) != 0)
+ __skb_linearize(skb, GFP_ATOMIC) != 0)
                         return NF_DROP;
         }
 

.... now give me a feedback please 8)

Daniele.

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:01 EST