diff options
-rw-r--r-- | include/linux/inetdevice.h | 14 | ||||
-rw-r--r-- | include/net/arp.h | 2 | ||||
-rw-r--r-- | include/net/ip.h | 11 | ||||
-rw-r--r-- | net/ipv4/af_inet.c | 6 | ||||
-rw-r--r-- | net/ipv4/arp.c | 2 | ||||
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 8 | ||||
-rw-r--r-- | net/ipv4/devinet.c | 10 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 2 | ||||
-rw-r--r-- | net/ipv4/raw.c | 4 | ||||
-rw-r--r-- | net/ipv4/route.c | 4 | ||||
-rw-r--r-- | net/ipv4/syncookies.c | 18 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 10 | ||||
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_timer.c | 2 |
15 files changed, 50 insertions, 47 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 5a0ab04627bc..c0f7aec331c2 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -124,12 +124,13 @@ static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) | |||
124 | * Check if a mask is acceptable. | 124 | * Check if a mask is acceptable. |
125 | */ | 125 | */ |
126 | 126 | ||
127 | static __inline__ int bad_mask(u32 mask, u32 addr) | 127 | static __inline__ int bad_mask(__be32 mask, __be32 addr) |
128 | { | 128 | { |
129 | __u32 hmask; | ||
129 | if (addr & (mask = ~mask)) | 130 | if (addr & (mask = ~mask)) |
130 | return 1; | 131 | return 1; |
131 | mask = ntohl(mask); | 132 | hmask = ntohl(mask); |
132 | if (mask & (mask+1)) | 133 | if (hmask & (hmask+1)) |
133 | return 1; | 134 | return 1; |
134 | return 0; | 135 | return 0; |
135 | } | 136 | } |
@@ -190,11 +191,12 @@ static __inline__ __be32 inet_make_mask(int logmask) | |||
190 | return 0; | 191 | return 0; |
191 | } | 192 | } |
192 | 193 | ||
193 | static __inline__ int inet_mask_len(__u32 mask) | 194 | static __inline__ int inet_mask_len(__be32 mask) |
194 | { | 195 | { |
195 | if (!(mask = ntohl(mask))) | 196 | __u32 hmask = ntohl(mask); |
197 | if (!hmask) | ||
196 | return 0; | 198 | return 0; |
197 | return 32 - ffz(~mask); | 199 | return 32 - ffz(~hmask); |
198 | } | 200 | } |
199 | 201 | ||
200 | 202 | ||
diff --git a/include/net/arp.h b/include/net/arp.h index 6a3d9a7d302b..f02664568600 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -16,7 +16,7 @@ extern void arp_send(int type, int ptype, __be32 dest_ip, | |||
16 | struct net_device *dev, __be32 src_ip, | 16 | struct net_device *dev, __be32 src_ip, |
17 | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); | 17 | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); |
18 | extern int arp_bind_neighbour(struct dst_entry *dst); | 18 | extern int arp_bind_neighbour(struct dst_entry *dst); |
19 | extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir); | 19 | extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); |
20 | extern void arp_ifdown(struct net_device *dev); | 20 | extern void arp_ifdown(struct net_device *dev); |
21 | 21 | ||
22 | extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | 22 | extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, |
diff --git a/include/net/ip.h b/include/net/ip.h index 949fa8683626..412e8114667d 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -123,7 +123,7 @@ extern int ip4_datagram_connect(struct sock *sk, | |||
123 | * multicast packets. | 123 | * multicast packets. |
124 | */ | 124 | */ |
125 | 125 | ||
126 | static inline void ip_tr_mc_map(u32 addr, char *buf) | 126 | static inline void ip_tr_mc_map(__be32 addr, char *buf) |
127 | { | 127 | { |
128 | buf[0]=0xC0; | 128 | buf[0]=0xC0; |
129 | buf[1]=0x00; | 129 | buf[1]=0x00; |
@@ -238,9 +238,9 @@ static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst | |||
238 | * Map a multicast IP onto multicast MAC for type ethernet. | 238 | * Map a multicast IP onto multicast MAC for type ethernet. |
239 | */ | 239 | */ |
240 | 240 | ||
241 | static inline void ip_eth_mc_map(u32 addr, char *buf) | 241 | static inline void ip_eth_mc_map(__be32 naddr, char *buf) |
242 | { | 242 | { |
243 | addr=ntohl(addr); | 243 | __u32 addr=ntohl(naddr); |
244 | buf[0]=0x01; | 244 | buf[0]=0x01; |
245 | buf[1]=0x00; | 245 | buf[1]=0x00; |
246 | buf[2]=0x5e; | 246 | buf[2]=0x5e; |
@@ -256,13 +256,14 @@ static inline void ip_eth_mc_map(u32 addr, char *buf) | |||
256 | * Leave P_Key as 0 to be filled in by driver. | 256 | * Leave P_Key as 0 to be filled in by driver. |
257 | */ | 257 | */ |
258 | 258 | ||
259 | static inline void ip_ib_mc_map(u32 addr, char *buf) | 259 | static inline void ip_ib_mc_map(__be32 naddr, char *buf) |
260 | { | 260 | { |
261 | __u32 addr; | ||
261 | buf[0] = 0; /* Reserved */ | 262 | buf[0] = 0; /* Reserved */ |
262 | buf[1] = 0xff; /* Multicast QPN */ | 263 | buf[1] = 0xff; /* Multicast QPN */ |
263 | buf[2] = 0xff; | 264 | buf[2] = 0xff; |
264 | buf[3] = 0xff; | 265 | buf[3] = 0xff; |
265 | addr = ntohl(addr); | 266 | addr = ntohl(naddr); |
266 | buf[4] = 0xff; | 267 | buf[4] = 0xff; |
267 | buf[5] = 0x12; /* link local scope */ | 268 | buf[5] = 0x12; /* link local scope */ |
268 | buf[6] = 0x40; /* IPv4 signature */ | 269 | buf[6] = 0x40; /* IPv4 signature */ |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 8db39f7e3bf0..1144900d37f6 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -644,7 +644,7 @@ int inet_getname(struct socket *sock, struct sockaddr *uaddr, | |||
644 | sin->sin_port = inet->dport; | 644 | sin->sin_port = inet->dport; |
645 | sin->sin_addr.s_addr = inet->daddr; | 645 | sin->sin_addr.s_addr = inet->daddr; |
646 | } else { | 646 | } else { |
647 | __u32 addr = inet->rcv_saddr; | 647 | __be32 addr = inet->rcv_saddr; |
648 | if (!addr) | 648 | if (!addr) |
649 | addr = inet->saddr; | 649 | addr = inet->saddr; |
650 | sin->sin_port = inet->sport; | 650 | sin->sin_port = inet->sport; |
@@ -995,8 +995,8 @@ static int inet_sk_reselect_saddr(struct sock *sk) | |||
995 | struct inet_sock *inet = inet_sk(sk); | 995 | struct inet_sock *inet = inet_sk(sk); |
996 | int err; | 996 | int err; |
997 | struct rtable *rt; | 997 | struct rtable *rt; |
998 | __u32 old_saddr = inet->saddr; | 998 | __be32 old_saddr = inet->saddr; |
999 | __u32 new_saddr; | 999 | __be32 new_saddr; |
1000 | __be32 daddr = inet->daddr; | 1000 | __be32 daddr = inet->daddr; |
1001 | 1001 | ||
1002 | if (inet->opt && inet->opt->srr) | 1002 | if (inet->opt && inet->opt->srr) |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index cfb5d3de9c84..3981e8be9ab8 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -203,7 +203,7 @@ struct neigh_table arp_tbl = { | |||
203 | .gc_thresh3 = 1024, | 203 | .gc_thresh3 = 1024, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir) | 206 | int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir) |
207 | { | 207 | { |
208 | switch (dev->type) { | 208 | switch (dev->type) { |
209 | case ARPHRD_ETHER: | 209 | case ARPHRD_ETHER: |
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 6460233407c7..c3a61ebbadef 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -966,7 +966,7 @@ static int cipso_v4_gentag_hdr(const struct cipso_v4_doi *doi_def, | |||
966 | 966 | ||
967 | buf[0] = IPOPT_CIPSO; | 967 | buf[0] = IPOPT_CIPSO; |
968 | buf[1] = CIPSO_V4_HDR_LEN + len; | 968 | buf[1] = CIPSO_V4_HDR_LEN + len; |
969 | *(u32 *)&buf[2] = htonl(doi_def->doi); | 969 | *(__be32 *)&buf[2] = htonl(doi_def->doi); |
970 | 970 | ||
971 | return 0; | 971 | return 0; |
972 | } | 972 | } |
@@ -1140,7 +1140,7 @@ int cipso_v4_validate(unsigned char **option) | |||
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | rcu_read_lock(); | 1142 | rcu_read_lock(); |
1143 | doi_def = cipso_v4_doi_getdef(ntohl(*((u32 *)&opt[2]))); | 1143 | doi_def = cipso_v4_doi_getdef(ntohl(*((__be32 *)&opt[2]))); |
1144 | if (doi_def == NULL) { | 1144 | if (doi_def == NULL) { |
1145 | err_offset = 2; | 1145 | err_offset = 2; |
1146 | goto validate_return_locked; | 1146 | goto validate_return_locked; |
@@ -1370,7 +1370,7 @@ int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr) | |||
1370 | if (ret_val == 0) | 1370 | if (ret_val == 0) |
1371 | return ret_val; | 1371 | return ret_val; |
1372 | 1372 | ||
1373 | doi = ntohl(*(u32 *)&cipso_ptr[2]); | 1373 | doi = ntohl(*(__be32 *)&cipso_ptr[2]); |
1374 | rcu_read_lock(); | 1374 | rcu_read_lock(); |
1375 | doi_def = cipso_v4_doi_getdef(doi); | 1375 | doi_def = cipso_v4_doi_getdef(doi); |
1376 | if (doi_def == NULL) { | 1376 | if (doi_def == NULL) { |
@@ -1436,7 +1436,7 @@ int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | |||
1436 | if (cipso_v4_cache_check(cipso_ptr, cipso_ptr[1], secattr) == 0) | 1436 | if (cipso_v4_cache_check(cipso_ptr, cipso_ptr[1], secattr) == 0) |
1437 | return 0; | 1437 | return 0; |
1438 | 1438 | ||
1439 | doi = ntohl(*(u32 *)&cipso_ptr[2]); | 1439 | doi = ntohl(*(__be32 *)&cipso_ptr[2]); |
1440 | rcu_read_lock(); | 1440 | rcu_read_lock(); |
1441 | doi_def = cipso_v4_doi_getdef(doi); | 1441 | doi_def = cipso_v4_doi_getdef(doi); |
1442 | if (doi_def == NULL) | 1442 | if (doi_def == NULL) |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f38cbbae0ae3..a1b356c8aa59 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -577,20 +577,20 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg | |||
577 | * Determine a default network mask, based on the IP address. | 577 | * Determine a default network mask, based on the IP address. |
578 | */ | 578 | */ |
579 | 579 | ||
580 | static __inline__ int inet_abc_len(u32 addr) | 580 | static __inline__ int inet_abc_len(__be32 addr) |
581 | { | 581 | { |
582 | int rc = -1; /* Something else, probably a multicast. */ | 582 | int rc = -1; /* Something else, probably a multicast. */ |
583 | 583 | ||
584 | if (ZERONET(addr)) | 584 | if (ZERONET(addr)) |
585 | rc = 0; | 585 | rc = 0; |
586 | else { | 586 | else { |
587 | addr = ntohl(addr); | 587 | __u32 haddr = ntohl(addr); |
588 | 588 | ||
589 | if (IN_CLASSA(addr)) | 589 | if (IN_CLASSA(haddr)) |
590 | rc = 8; | 590 | rc = 8; |
591 | else if (IN_CLASSB(addr)) | 591 | else if (IN_CLASSB(haddr)) |
592 | rc = 16; | 592 | rc = 16; |
593 | else if (IN_CLASSC(addr)) | 593 | else if (IN_CLASSC(haddr)) |
594 | rc = 24; | 594 | rc = 24; |
595 | } | 595 | } |
596 | 596 | ||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index def32d8d3b06..90942a384a45 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -341,7 +341,7 @@ packet_routed: | |||
341 | 341 | ||
342 | /* OK, we know where to send it, allocate and build IP header. */ | 342 | /* OK, we know where to send it, allocate and build IP header. */ |
343 | iph = (struct iphdr *) skb_push(skb, sizeof(struct iphdr) + (opt ? opt->optlen : 0)); | 343 | iph = (struct iphdr *) skb_push(skb, sizeof(struct iphdr) + (opt ? opt->optlen : 0)); |
344 | *((__u16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); | 344 | *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); |
345 | iph->tot_len = htons(skb->len); | 345 | iph->tot_len = htons(skb->len); |
346 | if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok) | 346 | if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok) |
347 | iph->frag_off = htons(IP_DF); | 347 | iph->frag_off = htons(IP_DF); |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 4b132953bcc2..57d4bae6f080 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -355,7 +355,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
355 | sin = (struct sockaddr_in *)msg->msg_name; | 355 | sin = (struct sockaddr_in *)msg->msg_name; |
356 | if (sin) { | 356 | if (sin) { |
357 | sin->sin_family = AF_INET; | 357 | sin->sin_family = AF_INET; |
358 | sin->sin_addr.s_addr = *(u32*)(skb->nh.raw + serr->addr_offset); | 358 | sin->sin_addr.s_addr = *(__be32*)(skb->nh.raw + serr->addr_offset); |
359 | sin->sin_port = serr->port; | 359 | sin->sin_port = serr->port; |
360 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); | 360 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); |
361 | } | 361 | } |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 5c31dead2bdc..a6c63bbd9ddb 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -854,8 +854,8 @@ static void raw_seq_stop(struct seq_file *seq, void *v) | |||
854 | static __inline__ char *get_raw_sock(struct sock *sp, char *tmpbuf, int i) | 854 | static __inline__ char *get_raw_sock(struct sock *sp, char *tmpbuf, int i) |
855 | { | 855 | { |
856 | struct inet_sock *inet = inet_sk(sp); | 856 | struct inet_sock *inet = inet_sk(sp); |
857 | unsigned int dest = inet->daddr, | 857 | __be32 dest = inet->daddr, |
858 | src = inet->rcv_saddr; | 858 | src = inet->rcv_saddr; |
859 | __u16 destp = 0, | 859 | __u16 destp = 0, |
860 | srcp = inet->num; | 860 | srcp = inet->num; |
861 | 861 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index d7152b2b2c64..ee00b6506ab4 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -566,8 +566,8 @@ static inline u32 rt_score(struct rtable *rt) | |||
566 | 566 | ||
567 | static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) | 567 | static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) |
568 | { | 568 | { |
569 | return ((fl1->nl_u.ip4_u.daddr ^ fl2->nl_u.ip4_u.daddr) | | 569 | return ((__force u32)((fl1->nl_u.ip4_u.daddr ^ fl2->nl_u.ip4_u.daddr) | |
570 | (fl1->nl_u.ip4_u.saddr ^ fl2->nl_u.ip4_u.saddr) | | 570 | (fl1->nl_u.ip4_u.saddr ^ fl2->nl_u.ip4_u.saddr)) | |
571 | (fl1->mark ^ fl2->mark) | | 571 | (fl1->mark ^ fl2->mark) | |
572 | (*(u16 *)&fl1->nl_u.ip4_u.tos ^ | 572 | (*(u16 *)&fl1->nl_u.ip4_u.tos ^ |
573 | *(u16 *)&fl2->nl_u.ip4_u.tos) | | 573 | *(u16 *)&fl2->nl_u.ip4_u.tos) | |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 661e0a4bca72..6b19530905af 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -35,23 +35,23 @@ module_init(init_syncookies); | |||
35 | #define COOKIEBITS 24 /* Upper bits store count */ | 35 | #define COOKIEBITS 24 /* Upper bits store count */ |
36 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) | 36 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) |
37 | 37 | ||
38 | static u32 cookie_hash(u32 saddr, u32 daddr, u32 sport, u32 dport, | 38 | static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, |
39 | u32 count, int c) | 39 | u32 count, int c) |
40 | { | 40 | { |
41 | __u32 tmp[16 + 5 + SHA_WORKSPACE_WORDS]; | 41 | __u32 tmp[16 + 5 + SHA_WORKSPACE_WORDS]; |
42 | 42 | ||
43 | memcpy(tmp + 3, syncookie_secret[c], sizeof(syncookie_secret[c])); | 43 | memcpy(tmp + 3, syncookie_secret[c], sizeof(syncookie_secret[c])); |
44 | tmp[0] = saddr; | 44 | tmp[0] = (__force u32)saddr; |
45 | tmp[1] = daddr; | 45 | tmp[1] = (__force u32)daddr; |
46 | tmp[2] = (sport << 16) + dport; | 46 | tmp[2] = ((__force u32)sport << 16) + (__force u32)dport; |
47 | tmp[3] = count; | 47 | tmp[3] = count; |
48 | sha_transform(tmp + 16, (__u8 *)tmp, tmp + 16 + 5); | 48 | sha_transform(tmp + 16, (__u8 *)tmp, tmp + 16 + 5); |
49 | 49 | ||
50 | return tmp[17]; | 50 | return tmp[17]; |
51 | } | 51 | } |
52 | 52 | ||
53 | static __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, __u16 sport, | 53 | static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport, |
54 | __u16 dport, __u32 sseq, __u32 count, | 54 | __be16 dport, __u32 sseq, __u32 count, |
55 | __u32 data) | 55 | __u32 data) |
56 | { | 56 | { |
57 | /* | 57 | /* |
@@ -80,8 +80,8 @@ static __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, __u16 sport, | |||
80 | * "maxdiff" if the current (passed-in) "count". The return value | 80 | * "maxdiff" if the current (passed-in) "count". The return value |
81 | * is (__u32)-1 if this test fails. | 81 | * is (__u32)-1 if this test fails. |
82 | */ | 82 | */ |
83 | static __u32 check_tcp_syn_cookie(__u32 cookie, __u32 saddr, __u32 daddr, | 83 | static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr, |
84 | __u16 sport, __u16 dport, __u32 sseq, | 84 | __be16 sport, __be16 dport, __u32 sseq, |
85 | __u32 count, __u32 maxdiff) | 85 | __u32 count, __u32 maxdiff) |
86 | { | 86 | { |
87 | __u32 diff; | 87 | __u32 diff; |
@@ -220,7 +220,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
220 | } | 220 | } |
221 | ireq = inet_rsk(req); | 221 | ireq = inet_rsk(req); |
222 | treq = tcp_rsk(req); | 222 | treq = tcp_rsk(req); |
223 | treq->rcv_isn = htonl(skb->h.th->seq) - 1; | 223 | treq->rcv_isn = ntohl(skb->h.th->seq) - 1; |
224 | treq->snt_isn = cookie; | 224 | treq->snt_isn = cookie; |
225 | req->mss = mss; | 225 | req->mss = mss; |
226 | ireq->rmt_port = skb->h.th->source; | 226 | ireq->rmt_port = skb->h.th->source; |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 8c8e8112f98d..0ca8dead03b0 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -542,7 +542,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) | |||
542 | struct { | 542 | struct { |
543 | struct tcphdr th; | 543 | struct tcphdr th; |
544 | #ifdef CONFIG_TCP_MD5SIG | 544 | #ifdef CONFIG_TCP_MD5SIG |
545 | u32 opt[(TCPOLEN_MD5SIG_ALIGNED >> 2)]; | 545 | __be32 opt[(TCPOLEN_MD5SIG_ALIGNED >> 2)]; |
546 | #endif | 546 | #endif |
547 | } rep; | 547 | } rep; |
548 | struct ip_reply_arg arg; | 548 | struct ip_reply_arg arg; |
@@ -618,9 +618,9 @@ static void tcp_v4_send_ack(struct tcp_timewait_sock *twsk, | |||
618 | struct tcphdr *th = skb->h.th; | 618 | struct tcphdr *th = skb->h.th; |
619 | struct { | 619 | struct { |
620 | struct tcphdr th; | 620 | struct tcphdr th; |
621 | u32 opt[(TCPOLEN_TSTAMP_ALIGNED >> 2) | 621 | __be32 opt[(TCPOLEN_TSTAMP_ALIGNED >> 2) |
622 | #ifdef CONFIG_TCP_MD5SIG | 622 | #ifdef CONFIG_TCP_MD5SIG |
623 | + (TCPOLEN_MD5SIG_ALIGNED >> 2) | 623 | + (TCPOLEN_MD5SIG_ALIGNED >> 2) |
624 | #endif | 624 | #endif |
625 | ]; | 625 | ]; |
626 | } rep; | 626 | } rep; |
@@ -2333,8 +2333,8 @@ static void get_tcp4_sock(struct sock *sp, char *tmpbuf, int i) | |||
2333 | struct tcp_sock *tp = tcp_sk(sp); | 2333 | struct tcp_sock *tp = tcp_sk(sp); |
2334 | const struct inet_connection_sock *icsk = inet_csk(sp); | 2334 | const struct inet_connection_sock *icsk = inet_csk(sp); |
2335 | struct inet_sock *inet = inet_sk(sp); | 2335 | struct inet_sock *inet = inet_sk(sp); |
2336 | unsigned int dest = inet->daddr; | 2336 | __be32 dest = inet->daddr; |
2337 | unsigned int src = inet->rcv_saddr; | 2337 | __be32 src = inet->rcv_saddr; |
2338 | __u16 destp = ntohs(inet->dport); | 2338 | __u16 destp = ntohs(inet->dport); |
2339 | __u16 srcp = ntohs(inet->sport); | 2339 | __u16 srcp = ntohs(inet->sport); |
2340 | 2340 | ||
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 4a0ee901a888..383cb38461c5 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -493,7 +493,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
493 | struct request_sock **prev) | 493 | struct request_sock **prev) |
494 | { | 494 | { |
495 | struct tcphdr *th = skb->h.th; | 495 | struct tcphdr *th = skb->h.th; |
496 | u32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); | 496 | __be32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); |
497 | int paws_reject = 0; | 497 | int paws_reject = 0; |
498 | struct tcp_options_received tmp_opt; | 498 | struct tcp_options_received tmp_opt; |
499 | struct sock *child; | 499 | struct sock *child; |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index fb09ade5897b..3355c276b611 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -297,7 +297,7 @@ static void tcp_retransmit_timer(struct sock *sk) | |||
297 | if (net_ratelimit()) { | 297 | if (net_ratelimit()) { |
298 | struct inet_sock *inet = inet_sk(sk); | 298 | struct inet_sock *inet = inet_sk(sk); |
299 | printk(KERN_DEBUG "TCP: Treason uncloaked! Peer %u.%u.%u.%u:%u/%u shrinks window %u:%u. Repaired.\n", | 299 | printk(KERN_DEBUG "TCP: Treason uncloaked! Peer %u.%u.%u.%u:%u/%u shrinks window %u:%u. Repaired.\n", |
300 | NIPQUAD(inet->daddr), htons(inet->dport), | 300 | NIPQUAD(inet->daddr), ntohs(inet->dport), |
301 | inet->num, tp->snd_una, tp->snd_nxt); | 301 | inet->num, tp->snd_una, tp->snd_nxt); |
302 | } | 302 | } |
303 | #endif | 303 | #endif |