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;
        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;
 
        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;
        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;
 }
 
 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;
 
 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;