Brian
David S. Miller wrote:
On Tue, 13 Apr 2004 22:44:17 -0700 "Buesker, Brian" <bbuesker@qualcomm.com> wrote:
Sorry, I missed that. The following line just needs to be added to pfkey_xfrm_policy2msg:
pol->sadb_x_policy_priority = xp->priority;
I don't have access to my development environment at this time, so I
can't provide the fix in patch form. I'll do so next Monday but feel
free to do so yourself if you want, since it is such a simple fix.
Please someone send me a new patch at their convenience, thanks.
diff -aru linux-2.6.5.orig/include/linux/pfkeyv2.h linux-2.6.5/include/linux/pfkeyv2.h --- linux-2.6.5.orig/include/linux/pfkeyv2.h 2004-04-03 19:38:00.000000000 -0800 +++ linux-2.6.5/include/linux/pfkeyv2.h 2004-04-05 08:27:12.000000000 -0700 @@ -181,7 +181,7 @@ uint8_t sadb_x_policy_dir; uint8_t sadb_x_policy_reserved; uint32_t sadb_x_policy_id; - uint32_t sadb_x_policy_reserved2; + uint32_t sadb_x_policy_priority; } __attribute__((packed)); /* sizeof(struct sadb_x_policy) == 16 */ diff -aru linux-2.6.5.orig/net/key/af_key.c linux-2.6.5/net/key/af_key.c --- linux-2.6.5.orig/net/key/af_key.c 2004-04-03 19:36:47.000000000 -0800 +++ linux-2.6.5/net/key/af_key.c 2004-04-19 08:30:35.378928878 -0700 @@ -1780,6 +1780,7 @@ } pol->sadb_x_policy_dir = dir+1; pol->sadb_x_policy_id = xp->index; + pol->sadb_x_policy_priority = xp->priority; for (i=0; i<xp->xfrm_nr; i++) { struct sadb_x_ipsecrequest *rq; @@ -1872,6 +1873,7 @@ xp->action = (pol->sadb_x_policy_type == IPSEC_POLICY_DISCARD ? XFRM_POLICY_BLOCK : XFRM_POLICY_ALLOW); + xp->priority = pol->sadb_x_policy_priority; sa = ext_hdrs[SADB_EXT_ADDRESS_SRC-1], xp->family = pfkey_sadb_addr2xfrm_addr(sa, &xp->selector.saddr);