diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
commit | 9f9f3e6e8548a596697778337110a423c384b6f3 (patch) | |
tree | 5dd4b290ef532cf5ecb058e1a92cd3435afeac8c /include/net/ip.h | |
parent | d5c9a365ee7d2fded249aa5abfc5e89587583029 (diff) |
Merge with Linux 2.3.49.
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index ecf397dbb..f3ab5ac7b 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -170,11 +170,9 @@ extern __inline__ int ip_send(struct sk_buff *skb) extern __inline__ int ip_decrease_ttl(struct iphdr *iph) { - u16 check = iph->check; - check = ntohs(check) + 0x0100; - if ((check & 0xFF00) == 0) - check++; /* carry overflow */ - iph->check = htons(check); + u32 check = iph->check; + check += __constant_htons(0x0100); + iph->check = check + (check>>16); return --iph->ttl; } |