summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-02-24 20:54:09 +0000
committerhenning <henning@openbsd.org>2004-02-24 20:54:09 +0000
commit813fcaa7a7f566f55ceb0b1ef80c76cc0cd8e2d6 (patch)
tree1767d67c0d1bd680873fe7fe9ff830a3cb0d0dbe
parentHandle 'source-track rule' requirement for 'max-src-nodes'. (diff)
downloadwireguard-openbsd-813fcaa7a7f566f55ceb0b1ef80c76cc0cd8e2d6.tar.xz
wireguard-openbsd-813fcaa7a7f566f55ceb0b1ef80c76cc0cd8e2d6.zip
correctly check send_packet()s return val
found by Ward Wouts <ward@wizeazz.nl> but fixed differently
-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),