diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-05-22 16:53:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-05-22 16:53:22 -0700 |
commit | 4195f81453b9727f82bb8ceae03411b7fe52a994 (patch) | |
tree | 061d410408c883058afbbbbc39b4276ac359dc03 /net/ipv4 | |
parent | ae181bc44c65fdc93d0d2d908534b22e43f60f56 (diff) | |
download | linux-3.10-4195f81453b9727f82bb8ceae03411b7fe52a994.tar.gz linux-3.10-4195f81453b9727f82bb8ceae03411b7fe52a994.tar.bz2 linux-3.10-4195f81453b9727f82bb8ceae03411b7fe52a994.zip |
[NET]: Fix "ntohl(ntohs" bugs
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipcomp.c | 2 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index cd810f41af1..95278b22b66 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c @@ -210,7 +210,7 @@ static void ipcomp4_err(struct sk_buff *skb, u32 info) skb->h.icmph->code != ICMP_FRAG_NEEDED) return; - spi = ntohl(ntohs(ipch->cpi)); + spi = htonl(ntohs(ipch->cpi)); x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET); if (!x) diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index f285bbf296e..8604c747bca 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -221,7 +221,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) if (pskb_may_pull(skb, xprth + 4 - skb->data)) { u16 *ipcomp_hdr = (u16 *)xprth; - fl->fl_ipsec_spi = ntohl(ntohs(ipcomp_hdr[1])); + fl->fl_ipsec_spi = htonl(ntohs(ipcomp_hdr[1])); } break; default: |