aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common/lpf.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-02-28 20:34:40 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-02-28 20:34:40 +0000
commit06456076746ea64f78c59057928b2c7dfd2d734e (patch)
treedf4cd80f77d6ff8d12ecef362039cb4041880fa3 /contrib/isc-dhcp/common/lpf.c
parentb02401bdd6455578fb36dc5eed002b83d88e4954 (diff)
downloadsrc-06456076746ea64f78c59057928b2c7dfd2d734e.tar.gz
src-06456076746ea64f78c59057928b2c7dfd2d734e.zip
Virgin import of ISC-DHCP v2.0b1pl17vendor/isc-dhcp/2.0b1-pl.17
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=44335 svn path=/vendor/isc-dhcp/2.0b1-pl.17/; revision=44337; tag=vendor/isc-dhcp/2.0b1-pl.17
Diffstat (limited to 'contrib/isc-dhcp/common/lpf.c')
-rw-r--r--contrib/isc-dhcp/common/lpf.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/contrib/isc-dhcp/common/lpf.c b/contrib/isc-dhcp/common/lpf.c
index 7c6ff74d628e..d31d6f3cb96e 100644
--- a/contrib/isc-dhcp/common/lpf.c
+++ b/contrib/isc-dhcp/common/lpf.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.1.2.4 1999/02/09 04:51:05 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.1.2.6 1999/02/23 22:09:55 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)
- note ("Sending on LPF/%s/%s/%s",
+ note ("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)
error ("Can't install packet filter program: %m");
}
if (!quiet_interface_discovery)
- note ("Listening on LPF/%s/%s/%s",
+ note ("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 */