Commit 76ab608d86cf1ef5c5c46819b5733eb9f9f964f8
Committed by
David S. Miller
1 parent
5f8ac64b15
Exists in
master
and in
7 other branches
[NET]: Endian-annotate struct iphdr
And fix trivial warnings that emerged. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 4 changed files with 9 additions and 9 deletions Side-by-side Diff
include/linux/ip.h
... | ... | @@ -90,14 +90,14 @@ |
90 | 90 | #error "Please fix <asm/byteorder.h>" |
91 | 91 | #endif |
92 | 92 | __u8 tos; |
93 | - __u16 tot_len; | |
94 | - __u16 id; | |
95 | - __u16 frag_off; | |
93 | + __be16 tot_len; | |
94 | + __be16 id; | |
95 | + __be16 frag_off; | |
96 | 96 | __u8 ttl; |
97 | 97 | __u8 protocol; |
98 | 98 | __u16 check; |
99 | - __u32 saddr; | |
100 | - __u32 daddr; | |
99 | + __be32 saddr; | |
100 | + __be32 daddr; | |
101 | 101 | /*The options start here. */ |
102 | 102 | }; |
103 | 103 |
net/ipv4/ip_fragment.c
net/ipv4/ip_output.c
... | ... | @@ -418,7 +418,7 @@ |
418 | 418 | struct sk_buff *skb2; |
419 | 419 | unsigned int mtu, hlen, left, len, ll_rs; |
420 | 420 | int offset; |
421 | - int not_last_frag; | |
421 | + __be16 not_last_frag; | |
422 | 422 | struct rtable *rt = (struct rtable*)skb->dst; |
423 | 423 | int err = 0; |
424 | 424 | |
... | ... | @@ -1180,7 +1180,7 @@ |
1180 | 1180 | struct ip_options *opt = NULL; |
1181 | 1181 | struct rtable *rt = inet->cork.rt; |
1182 | 1182 | struct iphdr *iph; |
1183 | - int df = 0; | |
1183 | + __be16 df = 0; | |
1184 | 1184 | __u8 ttl; |
1185 | 1185 | int err = 0; |
1186 | 1186 |
net/ipv4/ipvs/ip_vs_xmit.c
... | ... | @@ -322,7 +322,7 @@ |
322 | 322 | struct net_device *tdev; /* Device to other host */ |
323 | 323 | struct iphdr *old_iph = skb->nh.iph; |
324 | 324 | u8 tos = old_iph->tos; |
325 | - u16 df = old_iph->frag_off; | |
325 | + __be16 df = old_iph->frag_off; | |
326 | 326 | struct iphdr *iph; /* Our new IP header */ |
327 | 327 | int max_headroom; /* The extra header space needed */ |
328 | 328 | int mtu; |