xfrm: clone mark when cloning policy
authorJamal Hadi Salim <hadi@cyberus.ca>
Tue, 23 Feb 2010 23:09:53 +0000 (15:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Feb 2010 23:09:53 +0000 (15:09 -0800)
When we clone the SP, we should also clone the mark.
Useful for socket based SPs.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_policy.c

index 2a6e64652654a7b3a7baa64399e72ab8b6916f13..34a5ef8316e7e23378543f442ee0ac66a4fbf409 100644 (file)
@@ -1154,6 +1154,7 @@ static struct xfrm_policy *clone_policy(struct xfrm_policy *old, int dir)
                }
                newp->lft = old->lft;
                newp->curlft = old->curlft;
+               newp->mark = old->mark;
                newp->action = old->action;
                newp->flags = old->flags;
                newp->xfrm_nr = old->xfrm_nr;