From 7673a35af21a031689b2cfc816c8d7895e3718a2 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 24 Feb 2004 20:54:10 +0000 Subject: correctly check send_packet()s return val found by Ward Wouts but fixed differently --- usr.sbin/dhcp/relay/dhcrelay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/dhcp') 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), -- cgit v1.2.3