summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/bpf.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2017-09-17 21:20:23 +0000
committerkrw <krw@openbsd.org>2017-09-17 21:20:23 +0000
commitb53f3a4d496600db1316360e7e91181b617ab0cd (patch)
tree3d43ef17870968012885ad7c3140ef82c6bcf1de /sbin/dhclient/bpf.c
parentuse strip directly. The layers if macros are not actually helpful. (diff)
downloadwireguard-openbsd-b53f3a4d496600db1316360e7e91181b617ab0cd.tar.xz
wireguard-openbsd-b53f3a4d496600db1316360e7e91181b617ab0cd.zip
Create global 'log_procname' and set it to '<ifname>' or
'<ifname> [priv]' as appropriate for the process doing the setting. Use it as the prefix in all log_*() output. Makes tracking messages for an interface or a process much easier.
Diffstat (limited to 'sbin/dhclient/bpf.c')
-rw-r--r--sbin/dhclient/bpf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index 7106a00937f..e1d7ce12ebc 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.64 2017/09/14 00:10:17 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.65 2017/09/17 21:20:23 krw Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -308,8 +308,8 @@ send_packet(struct interface_info *ifi, struct in_addr from, struct in_addr to)
}
if (result == -1)
- log_warn("send_packet");
- return result ;
+ log_warn("%s: send_packet", log_procname);
+ return result;
}
ssize_t