From: Tobias Brunner Date: Tue, 13 May 2014 10:20:02 +0000 (+0200) Subject: libipsec: Add support for new policy priority class X-Git-Tag: 5.2.0rc1~26^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b883719a13561b032ca3000a7caa918ad53db6e;p=thirdparty%2Fstrongswan.git libipsec: Add support for new policy priority class --- diff --git a/src/libipsec/ipsec_policy_mgr.c b/src/libipsec/ipsec_policy_mgr.c index 02dc59d65b..e2eaba014e 100644 --- a/src/libipsec/ipsec_policy_mgr.c +++ b/src/libipsec/ipsec_policy_mgr.c @@ -22,7 +22,7 @@ #include /** Base priority for installed policies */ -#define PRIO_BASE 512 +#define PRIO_BASE 384 typedef struct private_ipsec_policy_mgr_t private_ipsec_policy_mgr_t; @@ -88,6 +88,9 @@ static u_int32_t calculate_priority(policy_priority_t policy_priority, priority <<= 1; /* fall-through */ case POLICY_PRIORITY_DEFAULT: + priority <<= 1; + /* fall-through */ + case POLICY_PRIORITY_PASS: break; } /* calculate priority based on selector size, small size = high prio */