diff options
author | Ted Lemon <source@isc.org> | 1999-02-25 23:30:43 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1999-02-25 23:30:43 +0000 |
commit | 74f45f9642639bf4dfc7a28595363055d4c1b955 (patch) | |
tree | 84218f8405c4619b257b60a5bd5941090d9af0fa /common/nit.c | |
parent | ce53cc84e93fb0cdb4d6fa912577ea45074ea0f7 (diff) | |
download | isc-dhcp-74f45f9642639bf4dfc7a28595363055d4c1b955.tar.gz |
Sync with 2.0b1pl16. Fix some pool allocation problems.
Diffstat (limited to 'common/nit.c')
-rw-r--r-- | common/nit.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/common/nit.c b/common/nit.c index 5734f695..656a6181 100644 --- a/common/nit.c +++ b/common/nit.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: nit.c,v 1.17 1999/02/24 17:56:46 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: nit.c,v 1.18 1999/02/25 23:30:35 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -155,12 +155,13 @@ void if_register_send (info) info -> wfdesc = info -> rfdesc; #endif if (!quiet_interface_discovery) - log_info ("Sending on NIT/%s/%s", + log_info ("Sending on NIT/%s%s%s", print_hw_addr (info -> hw_address.htype, info -> hw_address.hlen, info -> hw_address.haddr), + (info -> shared_network ? "/" : ""), (info -> shared_network ? - info -> shared_network -> name : "unattached")); + info -> shared_network -> name : "")); } #endif /* USE_NIT_SEND */ @@ -238,12 +239,13 @@ void if_register_receive (info) log_fatal ("Can't set NIT filter on %s: %m", info -> name); if (!quiet_interface_discovery) - log_info ("Listening on NIT/%s/%s", + log_info ("Listening on NIT/%s%s%s", print_hw_addr (info -> hw_address.htype, info -> hw_address.hlen, info -> hw_address.haddr), + (info -> shared_network ? "/" : ""), (info -> shared_network ? - info -> shared_network -> name : "unattached")); + info -> shared_network -> name : "")); } #endif /* USE_NIT_RECEIVE */ @@ -263,6 +265,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) struct strbuf ctl, data; int hw_end; struct sockaddr_in foo; + int result; if (!strcmp (interface -> name, "fallback")) return send_fallback (interface, packet, raw, @@ -298,7 +301,10 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) data.buf = (char *)&buf [hw_end]; data.maxlen = data.len = bufp + len - hw_end; - return putmsg (interface -> wfdesc, &ctl, &data, 0); + result = putmsg (interface -> wfdesc, &ctl, &data, 0); + if (result < 0) + warn ("send_packet: %m"); + return result; } #endif /* USE_NIT_SEND */ |