[IPVS]: More endianness fixed.
[pandora-kernel.git] / net / ipv4 / ipvs / ip_vs_proto_tcp.c
index 820e831..6ff05c3 100644 (file)
@@ -29,7 +29,7 @@ static struct ip_vs_conn *
 tcp_conn_in_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
                const struct iphdr *iph, unsigned int proto_off, int inverse)
 {
-       __u16 _ports[2], *pptr;
+       __be16 _ports[2], *pptr;
 
        pptr = skb_header_pointer(skb, proto_off, sizeof(_ports), _ports);
        if (pptr == NULL)
@@ -50,7 +50,7 @@ static struct ip_vs_conn *
 tcp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
                 const struct iphdr *iph, unsigned int proto_off, int inverse)
 {
-       __u16 _ports[2], *pptr;
+       __be16 _ports[2], *pptr;
 
        pptr = skb_header_pointer(skb, proto_off, sizeof(_ports), _ports);
        if (pptr == NULL)
@@ -112,12 +112,12 @@ tcp_conn_schedule(struct sk_buff *skb,
 
 
 static inline void
-tcp_fast_csum_update(struct tcphdr *tcph, u32 oldip, u32 newip,
-                    u16 oldport, u16 newport)
+tcp_fast_csum_update(struct tcphdr *tcph, __be32 oldip, __be32 newip,
+                    __be16 oldport, __be16 newport)
 {
        tcph->check =
                ip_vs_check_diff(~oldip, newip,
-                                ip_vs_check_diff(oldport ^ 0xFFFF,
+                                ip_vs_check_diff(oldport ^ htons(0xFFFF),
                                                  newport, tcph->check));
 }