From d8c36304a3ab51547a4075b68dc13ee473e24e68 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 25 Nov 2008 17:50:36 -0800 Subject: [PATCH] --- yaml --- r: 122220 b: refs/heads/master c: 7067802e262457a9737521e5669b622028b2283a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/xfrm.h | 1 + trunk/net/key/af_key.c | 2 ++ trunk/net/xfrm/xfrm_user.c | 6 ++++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5d6d196b1af4..1f55e0287f56 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc34acd36eecdec95171b98ef2516e3d4daa5c41 +refs/heads/master: 7067802e262457a9737521e5669b622028b2283a diff --git a/trunk/include/net/xfrm.h b/trunk/include/net/xfrm.h index e027179e8199..52e784fa2c50 100644 --- a/trunk/include/net/xfrm.h +++ b/trunk/include/net/xfrm.h @@ -256,6 +256,7 @@ struct km_event u32 seq; u32 pid; u32 event; + struct net *net; }; struct net_device; diff --git a/trunk/net/key/af_key.c b/trunk/net/key/af_key.c index a0d849848ddd..ea7755ab7e6a 100644 --- a/trunk/net/key/af_key.c +++ b/trunk/net/key/af_key.c @@ -1739,6 +1739,7 @@ static int pfkey_flush(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hd c.seq = hdr->sadb_msg_seq; c.pid = hdr->sadb_msg_pid; c.event = XFRM_MSG_FLUSHSA; + c.net = &init_net; km_state_notify(NULL, &c); return 0; @@ -2693,6 +2694,7 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, struct sadb_msg c.event = XFRM_MSG_FLUSHPOLICY; c.pid = hdr->sadb_msg_pid; c.seq = hdr->sadb_msg_seq; + c.net = &init_net; km_policy_notify(NULL, 0, &c); return 0; diff --git a/trunk/net/xfrm/xfrm_user.c b/trunk/net/xfrm/xfrm_user.c index ab8b138e5e2f..3e32ec2ea1ad 100644 --- a/trunk/net/xfrm/xfrm_user.c +++ b/trunk/net/xfrm/xfrm_user.c @@ -1418,6 +1418,7 @@ static int xfrm_flush_sa(struct sk_buff *skb, struct nlmsghdr *nlh, c.event = nlh->nlmsg_type; c.seq = nlh->nlmsg_seq; c.pid = nlh->nlmsg_pid; + c.net = net; km_state_notify(NULL, &c); return 0; @@ -1569,6 +1570,7 @@ static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh, c.event = nlh->nlmsg_type; c.seq = nlh->nlmsg_seq; c.pid = nlh->nlmsg_pid; + c.net = net; km_policy_notify(NULL, 0, &c); return 0; } @@ -2084,7 +2086,7 @@ static int xfrm_aevent_state_notify(struct xfrm_state *x, struct km_event *c) static int xfrm_notify_sa_flush(struct km_event *c) { - struct net *net = &init_net; + struct net *net = c->net; struct xfrm_usersa_flush *p; struct nlmsghdr *nlh; struct sk_buff *skb; @@ -2446,7 +2448,7 @@ static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event * static int xfrm_notify_policy_flush(struct km_event *c) { - struct net *net = &init_net; + struct net *net = c->net; struct nlmsghdr *nlh; struct sk_buff *skb;