]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Report user triggered expirations against the users socket
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 7 Sep 2012 21:17:17 +0000 (21:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Sep 2012 19:34:30 +0000 (15:34 -0400)
commit60b5cf5c13c540c83d3d6dd3292aa8f1884fd8c7
tree0ec3bd7a23eccd33e3f1857de1637715eb65c17d
parentf6ce07bfda43af8ff2d0cb977697e90016ae05aa
xfrm: Report user triggered expirations against the users socket

When a policy expiration is triggered from user space the request
travels through km_policy_expired and ultimately into
xfrm_exp_policy_notify which calls build_polexpire.  build_polexpire
uses the netlink port passed to km_policy_expired as the source port for
the netlink message it builds.

When a state expiration is triggered from user space the request travles
through km_state_expired and ultimately into xfrm_exp_state_notify which
calls build_expire.  build_expire uses the netlink port passed to
km_state_expired as the source port for the netlink message it builds.

Pass nlh->nlmsg_pid from the user generated netlink message that
requested the expiration to km_policy_expired and km_state_expired
instead of current->pid which is not a netlink port number.

Cc: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_user.c