kernel-netlink: Properly set port mask for ICMP type/code if only set on one side
authorTobias Brunner <tobias@strongswan.org>
Wed, 26 Aug 2015 15:46:10 +0000 (17:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 31 Aug 2015 13:30:57 +0000 (15:30 +0200)
commit7b20ab0a9403c9cbeb7009a5cf77d7f3f6d3f5dd
tree216958702123c81dcffdb5462c6ebf7698cab4db
parentd34a82dd57f11025f0b39537d414e2eb5fc6ad8b
kernel-netlink: Properly set port mask for ICMP type/code if only set on one side

If only one traffic selector had a port (type/code) the other side had
the port mask set to 0, which canceled out the applied type/code.

It also fixes the installation of ICMP type/code on big-endian hosts.

Fixes #1091.
References #595.
src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c