aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index eafbcaf728fd..83cb9ac5554e 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -192,9 +192,9 @@ extern void ipfrag_init(void);
192static inline 192static inline
193int ip_decrease_ttl(struct iphdr *iph) 193int ip_decrease_ttl(struct iphdr *iph)
194{ 194{
195 u32 check = iph->check; 195 u32 check = (__force u32)iph->check;
196 check += htons(0x0100); 196 check += (__force u32)htons(0x0100);
197 iph->check = check + (check>=0xFFFF); 197 iph->check = (__force __sum16)(check + (check>=0xFFFF));
198 return --iph->ttl; 198 return --iph->ttl;
199} 199}
200 200