]> git.ipfire.org Git - thirdparty/strongswan.git/commit
chunk: Fix internet checksum calculation on big-endian systems
authorTobias Brunner <tobias@strongswan.org>
Wed, 22 Oct 2014 17:41:40 +0000 (19:41 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 23 Oct 2014 09:13:28 +0000 (11:13 +0200)
commiteb218ff80b8f6b88ed74249a9c6fecb860454110
treec750511ff5614dc11b4de8e5b2347912b0437dc1
parent4736ba06578f860a85e84cec1c79fb126793307e
chunk: Fix internet checksum calculation on big-endian systems

ntohs() might be defined as noop (#define ntohs(x) (x)) so we have
to manually shorten the negated value (gets promoted to an int).

Fixes #747.
src/libstrongswan/utils/chunk.c