diff options
author | 2006-05-27 20:07:42 +0000 | |
---|---|---|
committer | 2006-05-27 20:07:42 +0000 | |
commit | fae6462d23e22e3d46c5eb50e627beba06540562 (patch) | |
tree | 08c93201c69e422316a897b9b301d06fd479a4cf | |
parent | Fix obvious error in code that is currently not compiled. (diff) | |
download | wireguard-openbsd-fae6462d23e22e3d46c5eb50e627beba06540562.tar.xz wireguard-openbsd-fae6462d23e22e3d46c5eb50e627beba06540562.zip |
sync to bgpd: use ibuf->pid in imsg_create if pid == 0, claudio ok
-rw-r--r-- | usr.sbin/ospfd/imsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/imsg.c b/usr.sbin/ospfd/imsg.c index 8fded0d56a9..bfb4d886242 100644 --- a/usr.sbin/ospfd/imsg.c +++ b/usr.sbin/ospfd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.6 2006/02/10 18:30:47 claudio Exp $ */ +/* $OpenBSD: imsg.c,v 1.7 2006/05/27 20:07:42 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -132,7 +132,8 @@ imsg_create(struct imsgbuf *ibuf, enum imsg_type type, u_int32_t peerid, hdr.len = (u_int16_t)(datalen + IMSG_HEADER_SIZE); hdr.type = type; hdr.peerid = peerid; - hdr.pid = pid; + if ((hdr.pid = pid) == 0) + hdr.pid = ibuf->pid; if ((wbuf = buf_open(hdr.len)) == NULL) { log_warn("imsg_create: buf_open"); return (NULL); |