summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-02-24 20:54:10 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-02-24 20:54:10 +0000
commit7673a35af21a031689b2cfc816c8d7895e3718a2 (patch)
tree6ea1b0f22a9cdd2d6a5dc8cd5a6be8c879676498 /usr.sbin/dhcp
parent0646b9a92c33a96418a75f7b790f856eb12fa03c (diff)
correctly check send_packet()s return val
found by Ward Wouts <ward@wizeazz.nl> but fixed differently
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r--usr.sbin/dhcp/relay/dhcrelay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/dhcp/relay/dhcrelay.c b/usr.sbin/dhcp/relay/dhcrelay.c
index d8c28bfe176..2f5b591e589 100644
--- a/usr.sbin/dhcp/relay/dhcrelay.c
+++ b/usr.sbin/dhcp/relay/dhcrelay.c
@@ -296,10 +296,10 @@ void relay (ip, packet, length, from_port, from, hfrom)
return;
}
- if (!send_packet (out,
+ if (send_packet (out,
(struct packet *)0,
packet, length, out -> primary_address,
- &to, &hto) < 0)
+ &to, &hto) != -1)
debug ("forwarded BOOTREPLY for %s to %s",
print_hw_addr (packet -> htype, packet -> hlen,
packet -> chaddr),
@@ -324,11 +324,11 @@ void relay (ip, packet, length, from_port, from, hfrom)
/* Otherwise, it's a BOOTREQUEST, so forward it to all the
servers. */
for (sp = servers; sp; sp = sp -> next) {
- if (!send_packet ((fallback_interface
+ if (send_packet ((fallback_interface
? fallback_interface : interfaces),
(struct packet *)0,
packet, length, ip -> primary_address,
- &sp -> to, (struct hardware *)0) < 0) {
+ &sp -> to, (struct hardware *)0) != -1) {
debug ("forwarded BOOTREQUEST for %s to %s",
print_hw_addr (packet -> htype, packet -> hlen,
packet -> chaddr),