aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_pfkey
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-05-13 12:19:41 +0200
committerTobias Brunner <tobias@strongswan.org>2014-06-19 14:20:33 +0200
commit77b6a145a029810339033ad183d0e23169a787c7 (patch)
treee065ac4121e833ef0b9c776a31b6340ac5fef940 /src/libhydra/plugins/kernel_pfkey
parentf1675e4e291e98145acf274e7b8376601eac953a (diff)
downloadstrongswan-77b6a145a029810339033ad183d0e23169a787c7.tar.bz2
strongswan-77b6a145a029810339033ad183d0e23169a787c7.tar.xz
kernel-pfkey: Add support for new policy priority class
Diffstat (limited to 'src/libhydra/plugins/kernel_pfkey')
-rw-r--r--src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index 9bddb13a1..1037d9946 100644
--- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -135,8 +135,8 @@
#define SOL_UDP IPPROTO_UDP
#endif
-/** default priority of installed policies */
-#define PRIO_BASE 512
+/** base priority for installed policies */
+#define PRIO_BASE 384
#ifdef __APPLE__
/** from xnu/bsd/net/pfkeyv2.h */
@@ -583,6 +583,9 @@ static inline u_int32_t get_priority(policy_entry_t *policy,
priority <<= 1;
/* fall-through */
case POLICY_PRIORITY_DEFAULT:
+ priority <<= 1;
+ /* fall-trough */
+ case POLICY_PRIORITY_PASS:
break;
}
/* calculate priority based on selector size, small size = high prio */