Commit Graph

82 Commits

Author SHA1 Message Date
edf3b02b6a Fix header include guards to not use leading underscores. 2010-11-13 06:51:57 -05:00
336a54fa47 Clean dhcpd.h. 2010-11-13 06:48:50 -05:00
bb5446cf02 Remove leases.h. 2010-11-13 06:45:34 -05:00
a059b5bd13 Clean up 'unsigned long' used with the assumption that long == 32-bit. 2010-11-13 06:42:52 -05:00
8d9cc0bdb4 Remove unused attach_option() from options.c. 2010-11-13 06:28:03 -05:00
431bb5d11e Clean up paren use with sizeof and & in clientpacket.c. 2010-11-13 06:22:22 -05:00
35c4c773cd Remove unnecessary casts from setsockopt().
Prevent access to initialized memory in raw_socket()'s bind() call by
using memset().
2010-11-13 06:13:10 -05:00
f59ccfb5b0 In sendto() and write(), make sure all pointer arithmetic is in byte
sized units.
2010-11-13 05:59:15 -05:00
502419c598 More detailed error prints in get_raw_packet(). 2010-11-13 05:53:32 -05:00
ce518cc99f Properly cast read buffer to (char *) in get_raw_packet(). 2010-11-12 21:54:20 -05:00
37bf851ca7 Clean up raw socket read error path a bit. 2010-11-12 21:44:28 -05:00
2ae6025110 Zero length packets cannot be received now in get_raw_packet(). 2010-11-12 20:15:15 -05:00
0b1a3b4c14 Create a pidfile even in the case where ndhc never backgrounds. 2010-11-12 20:08:16 -05:00
ac6f60c4fe Create a pidfile that matches the daemon process id when backgrounded. 2010-11-12 20:03:55 -05:00
9ce31ec4d8 Make background() idempotent in a cleaner way. 2010-11-12 19:50:04 -05:00
5f55dbc3ff Fix previous commit -- handle filling empty options properly.
Clean up pidfile defaults and help message.
Clean up the write/sendto fixes to be a bit more readable.
2010-11-12 19:43:16 -05:00
31d15af0fa Don't fork off subprocesses to send to ifchd. Totally unnecessary. 2010-11-12 19:04:51 -05:00
c4f912a525 Fix a bug where a packet read would potentially stop before grabbing
a full sized dhcp packet if one is available.
2010-11-12 18:56:30 -05:00
5b7a3e43e0 Rename dhcpc.c to ndhc.c. 2010-11-12 18:46:02 -05:00
eb6009a5ee Make write() and sendto() properly handle short writes and errors in ndhc.
Make ndhc write a pidfile.
Clean up defines.h and split out ifchd and ndhc specifics.
2010-11-12 18:44:49 -05:00
e781322b4d Add defines for toggling packet send count before timeout and timeout length. 2010-11-12 18:19:19 -05:00
c0703fc8c9 Handle option lists properly in script.c. 2010-11-12 18:04:54 -05:00
9d7ad2f11c Fix some strlcpy() misuse that cuts off the last character of the copied
string.
Clean up some log messages.
2010-11-12 17:24:54 -05:00
f4a00f3826 Whitespace and indentation normalization. 2010-11-12 14:33:17 -05:00
2262845be6 Robustify get_raw_packet(). Error messages are now more specific, and
read() properly handles short reads and EINTR/EAGAIN/EWOULDBLOCK.
Update documentation.
2010-11-12 13:24:07 -05:00
81398c79fb Fix strlcpy to not truncate in ndhc.
Length check cleanups.
Use xmalloc() rather than malloc().
2010-11-12 12:19:52 -05:00
b2daf09c10 Move set_cap() to ncmlib/cap.[ch]. 2010-11-12 09:04:43 -05:00
a7ea0dd378 Fix typos in README. 2010-11-12 08:43:46 -05:00
b882669f85 Convert to using shared ncmlib. 2010-11-12 05:42:07 -05:00
b42eeb8847 Move ifchd files to a subdirectory. 2010-11-12 04:51:49 -05:00
c999fee9f5 Initial CMake support.
Fix an off-by-one array initialization.
Clean up VERSION a bit.
2010-11-12 04:44:25 -05:00
7a09ba2cf7 Initial commit. 2010-11-12 04:02:18 -05:00