Commit ea991f06 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPVS]: More endianness fixed.
  [IPVS]: Compile fix for annotations in userland.
parents 17092699 bb831eb2
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define _IP_VS_H #define _IP_VS_H
#include <asm/types.h> /* For __uXX types */ #include <asm/types.h> /* For __uXX types */
#include <linux/types.h> /* For __beXX types in userland */
#define IP_VS_VERSION_CODE 0x010201 #define IP_VS_VERSION_CODE 0x010201
#define NVERSION(version) \ #define NVERSION(version) \
......
...@@ -200,7 +200,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, ...@@ -200,7 +200,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
from = n_cp->vaddr; from = n_cp->vaddr;
port = n_cp->vport; port = n_cp->vport;
sprintf(buf,"%d,%d,%d,%d,%d,%d", NIPQUAD(from), sprintf(buf,"%d,%d,%d,%d,%d,%d", NIPQUAD(from),
ntohs(port)&255, (ntohs(port)>>8)&255); (ntohs(port)>>8)&255, ntohs(port)&255);
buf_len = strlen(buf); buf_len = strlen(buf);
/* /*
......
...@@ -117,7 +117,7 @@ tcp_fast_csum_update(struct tcphdr *tcph, __be32 oldip, __be32 newip, ...@@ -117,7 +117,7 @@ tcp_fast_csum_update(struct tcphdr *tcph, __be32 oldip, __be32 newip,
{ {
tcph->check = tcph->check =
ip_vs_check_diff(~oldip, newip, ip_vs_check_diff(~oldip, newip,
ip_vs_check_diff(oldport ^ htonl(0xFFFF), ip_vs_check_diff(oldport ^ htons(0xFFFF),
newport, tcph->check)); newport, tcph->check));
} }
......
...@@ -122,10 +122,10 @@ udp_fast_csum_update(struct udphdr *uhdr, __be32 oldip, __be32 newip, ...@@ -122,10 +122,10 @@ udp_fast_csum_update(struct udphdr *uhdr, __be32 oldip, __be32 newip,
{ {
uhdr->check = uhdr->check =
ip_vs_check_diff(~oldip, newip, ip_vs_check_diff(~oldip, newip,
ip_vs_check_diff(oldport ^ htonl(0xFFFF), ip_vs_check_diff(oldport ^ htons(0xFFFF),
newport, uhdr->check)); newport, uhdr->check));
if (!uhdr->check) if (!uhdr->check)
uhdr->check = htonl(0xFFFF); uhdr->check = -1;
} }
static int static int
...@@ -173,7 +173,7 @@ udp_snat_handler(struct sk_buff **pskb, ...@@ -173,7 +173,7 @@ udp_snat_handler(struct sk_buff **pskb,
cp->protocol, cp->protocol,
(*pskb)->csum); (*pskb)->csum);
if (udph->check == 0) if (udph->check == 0)
udph->check = htonl(0xFFFF); udph->check = -1;
IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n",
pp->name, udph->check, pp->name, udph->check,
(char*)&(udph->check) - (char*)udph); (char*)&(udph->check) - (char*)udph);
...@@ -228,7 +228,7 @@ udp_dnat_handler(struct sk_buff **pskb, ...@@ -228,7 +228,7 @@ udp_dnat_handler(struct sk_buff **pskb,
cp->protocol, cp->protocol,
(*pskb)->csum); (*pskb)->csum);
if (udph->check == 0) if (udph->check == 0)
udph->check = 0xFFFF; udph->check = -1;
(*pskb)->ip_summed = CHECKSUM_UNNECESSARY; (*pskb)->ip_summed = CHECKSUM_UNNECESSARY;
} }
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment