summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/sync.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() andkrw2017-02-131-3/+3
| | | | log_warn(). Zap a couple of explicit 'syslog()' calls.
* Adjust some long lines.krw2017-02-131-5/+5
|
* Do the strerror() elimination dance with log_warnx() -> log_warn(),krw2017-02-131-7/+5
| | | | fatalx() -> fatal() and even a couple of fprintf(stderr) -> log_warn().
* Switch from old errwarn.c logging to shiny new log.[ch].krw2017-02-131-11/+12
| | | | ok benno@
* - Use memset(*b, 0, len) instead of bzero(*b, len)mestre2016-10-211-14/+14
| | | | | | - Use explicit_bzero(3) instead of bzero(3) to clean temporary HMAC OK krw@
* Zap stray whitespace.krw2016-10-041-2/+2
|
* Eliminate #include inside *.h files and include only needed headers inkrw2016-02-061-18/+13
| | | | | | | each *.c file. Inspired by mention of header silliness by Edgar Pettijohn and mmcc@ on tech@.
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+1
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Scattering a few bcopy()'s around source using mostly memcpy() is justkrw2013-10-181-2/+2
| | | | asking for confusion. Replace bcopy()'s with memcpy()'s.
* %d -> %lld, add (long long) cast to time_t variables. Make guentherkrw2013-10-181-3/+4
| | | | and gcc happier. Found while looking at something else for dlg@.
* When sync'ing, look for lease by hwaddr and then ipaddr. Not hwaddrkrw2013-04-221-14/+6
| | | | | | twice. Simplify logic. Fixes loops while sync'ing for sthen@. Spotted by & fixed tested by sthen@.
* Give struct dhcp_synctlv_lease fields a prefix (lv_) as the fieldskrw2013-04-131-27/+28
| | | | | | in other structs have. Reduces potential for confusion with fields of same name but different types in leases. Use consistent variable name. No change to executable.
* Unbreak lease synchronization by making the sync header contain thekrw2013-04-121-2/+2
| | | | | | | | | correct packet length even when paddding is present. Previously the HMAC calculated by the receiver would not be based on the whole packet. Problem noted and essentially identical diffs from Kapetanakis Giannis via misc@ and then Johan Ymerson via bugs@.
* Use the provided note() and warning() functions of dhcpd instead ofclaudio2010-12-231-27/+16
| | | | | calling syslog_r() directly -- this make -d work as expected. OK reyk@, stsp@, deraadt@
* malloc/strlcpy -> strdup. Use consistent idiom.krw2010-03-271-2/+3
| | | | ok (as part of larger diff) blambert@ kettenis@ stsp@ zinovik@
* unused prototypederaadt2010-01-031-2/+1
|
* When checking if a syscall like open(), ioctl() or writev() failed compareclaudio2008-09-151-2/+2
| | | | directly against -1 and do not use a < 0 test. OK henning@
* correct size of iov[]; ralf.horstmann@gmx.dederaadt2008-05-301-2/+2
|
* fix sync.c to not puke if sync_lease called without sync_init.beck2008-05-111-1/+4
| | | | from henric.
* Insert pad blocks after sub-messages to keep the structures aligned toderaadt2008-05-081-2/+13
| | | | | 16 byte boundaries for maximum portability (somewhat similar to CMSG's) ok beck
* this should really only be in one file.beck2008-05-081-2/+2
|
* don't break dhcpd when not using synch mechanisms..beck2008-05-081-1/+4
|
* Add synchronisation support for dhcpd - this allows for two dhcpd'sbeck2008-05-071-0/+465
with the same configuration to be run on the same net and they will keep their lease files/state in synch, and therefore allowing you to run redundant dhcpd's. Synchronization code stolen from spamd, uses an hmac key in /var/db/dhcpd.key if it exists. ok krw@ deraadt@