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/lpf.c | |
parent | ce53cc84e93fb0cdb4d6fa912577ea45074ea0f7 (diff) | |
download | isc-dhcp-74f45f9642639bf4dfc7a28595363055d4c1b955.tar.gz |
Sync with 2.0b1pl16. Fix some pool allocation problems.
Diffstat (limited to 'common/lpf.c')
-rw-r--r-- | common/lpf.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/common/lpf.c b/common/lpf.c index 88544173..9e37fa9c 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: lpf.c,v 1.3 1999/02/24 17:56:45 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: lpf.c,v 1.4 1999/02/25 23:30:34 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -129,13 +129,14 @@ void if_register_send (info) info -> wfdesc = info -> rfdesc; #endif if (!quiet_interface_discovery) - log_info ("Sending on LPF/%s/%s/%s", + log_info ("Sending on LPF/%s/%s%s%s", info -> name, 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_LPF_SEND */ @@ -174,13 +175,14 @@ void if_register_receive (info) log_fatal ("Can't install packet filter program: %m"); } if (!quiet_interface_discovery) - log_info ("Listening on LPF/%s/%s/%s", + log_info ("Listening on LPF/%s/%s%s%s", info -> name, 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_LPF_RECEIVE */ @@ -197,6 +199,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) int bufp = 0; unsigned char buf [1500]; struct sockaddr sa; + int result; if (!strcmp (interface -> name, "fallback")) return send_fallback (interface, packet, raw, @@ -216,8 +219,11 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) strncpy (sa.sa_data, (const char *)interface -> ifp, sizeof sa.sa_data); - return sendto (interface -> wfdesc, buf, bufp + len, 0, - &sa, sizeof sa); + result = sendto (interface -> wfdesc, buf, bufp + len, 0, + &sa, sizeof sa); + if (result < 0) + warn ("send_packet: %m"); + return result; } #endif /* USE_LPF_SEND */ |