kernel-netlink: Add support for new policy priority class

This commit is contained in:
Tobias Brunner
2014-06-19 14:20:33 +02:00
parent 479060d2d6
commit f1675e4e29
@@ -70,8 +70,8 @@
#define SOL_UDP IPPROTO_UDP #define SOL_UDP IPPROTO_UDP
#endif #endif
/** Default priority of installed policies */ /** Base priority for installed policies */
#define PRIO_BASE 512 #define PRIO_BASE 384
/** Default lifetime of an acquire XFRM state (in seconds) */ /** Default lifetime of an acquire XFRM state (in seconds) */
#define DEFAULT_ACQUIRE_LIFETIME 165 #define DEFAULT_ACQUIRE_LIFETIME 165
@@ -606,6 +606,9 @@ static inline u_int32_t get_priority(policy_entry_t *policy,
priority <<= 1; priority <<= 1;
/* fall-through */ /* fall-through */
case POLICY_PRIORITY_DEFAULT: case POLICY_PRIORITY_DEFAULT:
priority <<= 1;
/* fall-through */
case POLICY_PRIORITY_PASS:
break; break;
} }
/* calculate priority based on selector size, small size = high prio */ /* calculate priority based on selector size, small size = high prio */