diff options
author | 2012-03-28 19:43:21 +0000 | |
---|---|---|
committer | 2012-03-28 19:43:21 +0000 | |
commit | e47fff728d006e821e6a339d15cf4efc284795b3 (patch) | |
tree | 2eb003e3164945b6bbc2b8ef0007bd0db93ec03c | |
parent | Another pid that needs to be the process pid and not the thread one. (diff) | |
download | wireguard-openbsd-e47fff728d006e821e6a339d15cf4efc284795b3.tar.xz wireguard-openbsd-e47fff728d006e821e6a339d15cf4efc284795b3.zip |
pfkey needs some p_p->ps_pid too. OK deraadt@ guenther@
-rw-r--r-- | sys/net/pfkeyv2.c | 6 | ||||
-rw-r--r-- | sys/net/pfkeyv2_parsemessage.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 9bf78f8ac5f..e52b05986cb 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.124 2011/01/12 18:49:21 mikeb Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.125 2012/03/28 19:43:21 claudio Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -156,7 +156,7 @@ pfkeyv2_create(struct socket *socket) pfkeyv2_socket->next = pfkeyv2_sockets; pfkeyv2_socket->socket = socket; - pfkeyv2_socket->pid = curproc->p_pid; + pfkeyv2_socket->pid = curproc->p_p->ps_pid; /* * XXX we should get this from the socket instead but @@ -903,7 +903,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len) smsg->sadb_msg_type = SADB_X_PROMISC; smsg->sadb_msg_len = (sizeof(struct sadb_msg) + len) / sizeof(uint64_t); - smsg->sadb_msg_seq = curproc->p_pid; + smsg->sadb_msg_seq = curproc->p_p->ps_pid; bcopy(message, freeme + sizeof(struct sadb_msg), len); diff --git a/sys/net/pfkeyv2_parsemessage.c b/sys/net/pfkeyv2_parsemessage.c index 68ac730b3fb..b85eb919eac 100644 --- a/sys/net/pfkeyv2_parsemessage.c +++ b/sys/net/pfkeyv2_parsemessage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.44 2010/07/01 02:09:45 reyk Exp $ */ +/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.45 2012/03/28 19:43:21 claudio Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -323,7 +323,7 @@ pfkeyv2_parsemessage(void *p, int len, void **headers) return (EINVAL); } - if (sadb_msg->sadb_msg_pid != curproc->p_pid) { + if (sadb_msg->sadb_msg_pid != curproc->p_p->ps_pid) { DPRINTF(("pfkeyv2_parsemessage: bad PID value\n")); return (EINVAL); } |