diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-09-20 15:14:53 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-09-20 15:14:53 +0000 |
commit | ec5e4ab8ab68ce10d7334a024cbb9af53eb0e815 (patch) | |
tree | 674624730b7c514d7f69eb583e8392ea84a8cfd7 /sbin/dhclient/dhclient.c | |
parent | 2a5704bef840903d1c79b5445426145aa7af32d1 (diff) |
Make send_packet() log entries more informative by
providing the name of the packet type that causes
an error.
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 64863341b73..a5c001057e5 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.505 2017/09/20 15:02:47 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.506 2017/09/20 15:14:52 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1335,7 +1335,7 @@ send_discover(struct interface_info *ifi) ifi->secs = packet->secs; - rslt = send_packet(ifi, inaddr_any, inaddr_broadcast); + rslt = send_packet(ifi, inaddr_any, inaddr_broadcast, "DHCPDISCOVER"); if (rslt != -1) log_info("%s: DHCPDISCOVER - interval %lld", log_procname, (long long)ifi->interval); @@ -1466,7 +1466,7 @@ send_request(struct interface_info *ifi) } - rslt = send_packet(ifi, from, destination.sin_addr); + rslt = send_packet(ifi, from, destination.sin_addr, "DHCPREQUEST"); if (rslt != -1) log_info("%s: DHCPREQUEST to %s", log_procname, inet_ntoa(destination.sin_addr)); @@ -1479,7 +1479,7 @@ send_decline(struct interface_info *ifi) { ssize_t rslt; - rslt = send_packet(ifi, inaddr_any, inaddr_broadcast); + rslt = send_packet(ifi, inaddr_any, inaddr_broadcast, "DHCPDECLINE"); if (rslt != -1) log_info("%s: DHCPDECLINE", log_procname); } |