Commit Graph

15 Commits

Author SHA1 Message Date
Nicholas J. Kain 8ede75738f When setting route, don't print an error if EEXIST is returned by the ioctl().
This 'error' merely means that the installed route already exists.
2011-05-31 11:55:26 -04:00
Nicholas J. Kain d72b24a2fe Theoretical correctness fix:
Handle EAGAIN and EWOULDBLOCK more gracefully when dealing with safe_read().
All occurrences of safe_read() should only be invoked on fds that have signaled
ready-to-read state via the epoll() mechanism, so this change should not
result in any observable difference, but it is best to be safe.

Additionally, a constant stack variable is converted to an equivalent
macro define for cleanliness.

Finally, print the error type encountered if reading data from an ARP response
fails with a read error.
2011-05-30 10:54:05 -04:00
Nicholas J. Kain 59beb159d3 Place the ifchange socket in /var/state/ifchange within the chroot
jail and change configuration instructions as well.

Change default configuration instructions to specify setting root
of the chroot jail as owned by root.root.
2011-05-01 20:43:29 -04:00
Nicholas J. Kain b3f9115689 Add a -V --verbose flag to enable the overly verbose list reciept logging.
Update interface flags only if it would provoke an actual change.
2011-04-30 07:30:07 -04:00
Nicholas J. Kain f2b4527179 Use epoll() and signalfd() in ifchd. 2010-12-01 12:22:08 -05:00
Nicholas J. Kain a43e69c7ae Factor out safe_write() into ncmlib and use it in ndhc as well. 2010-11-13 08:18:23 -05:00
Nicholas J. Kain 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
Nicholas J. Kain 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
Nicholas J. Kain f4a00f3826 Whitespace and indentation normalization. 2010-11-12 14:33:17 -05:00
Nicholas J. Kain 8aa6d9a320 Fix file_exists() to deal with modern variant.
Update README.
2010-11-12 12:05:37 -05:00
Nicholas J. Kain 15f6bb66ee Move DESIGN and README to root directory. 2010-11-12 09:39:33 -05:00
Nicholas J. Kain b2daf09c10 Move set_cap() to ncmlib/cap.[ch]. 2010-11-12 09:04:43 -05:00
Nicholas J. Kain 2bc86fad4e Clean whitespace in ifchd.c. 2010-11-12 06:05:46 -05:00
Nicholas J. Kain b882669f85 Convert to using shared ncmlib. 2010-11-12 05:42:07 -05:00
Nicholas J. Kain b42eeb8847 Move ifchd files to a subdirectory. 2010-11-12 04:51:49 -05:00