summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd
AgeCommit message (Collapse)Author
2014-07-09Fix classless-{ms-,}static-routes to comply RFC 3442. Number ofYASUOKA Masahiko
octets should be changed by corresponding to the prefix length. And 0 should be allowed for the prefix length. Also fix white spaces. Based on diff from Yuuichi Someya. ok krw
2014-06-11Prettify & refactor, no functional change.Martin Pelikan
ok beck
2014-05-07back out the previous ICMP simplifying diff, it caused livelocks.Martin Pelikan
reported by Mikolaj Kucharski, thanks! ok krw
2014-05-05Don't call the BOOTP handler indirectly.Martin Pelikan
ok krw
2014-05-05Don't call the ICMP handler indirectly + clean up a bit.Martin Pelikan
ok krw
2014-02-08Create dhclient lease files and dhcpd lease files with permissions 0640,Kenneth R Westerback
rather than 0000 and 0664 respectively. ok kettenis@ tedu@
2014-01-21sort;Jason McIntyre
2014-01-21Add parsing for options 121 (classless-static-routes) and 249Kenneth R Westerback
(classless-ms-static-routes). dhcpd can now specify and serve these options and dhclient can recognize and use supersede, etc. statements on them. Based on a diff from Stefan Rinke. Thanks!
2014-01-03consistent Nd lines for the various dhcp bits; help/ok krwJason McIntyre
2013-12-18Two 'break;'s in a row seems excessive.Kenneth R Westerback
2013-12-05Stop pretending we still support FDDI or token ring hardware types.Kenneth R Westerback
idea ok deraadt@ matthew@
2013-12-05Nuke local #define ETHER_HEADER_SIZE and use the identical value'dKenneth R Westerback
ETHER_HDR_LEN from if_ether.h. dhclient change ok matthew@ as part of larger diff.
2013-11-22unsigned char cast for some ctype callsTheo de Raadt
ok krw
2013-10-21Use the provided netmask on the subnet value provided in 'subnet'Kenneth R Westerback
statements, allowing subsequent comparisions with interface addresses to always work properly. Problem noted, fix tested & ok dlg@
2013-10-19fix a few obvious .Ar markup errors (unfortunately, there are many more)Ingo Schwarze
found while working on mandoc apropos
2013-10-18Scattering a few bcopy()'s around source using mostly memcpy() is justKenneth R Westerback
asking for confusion. Replace bcopy()'s with memcpy()'s.
2013-10-18%d -> %lld, add (long long) cast to time_t variables. Make guentherKenneth R Westerback
and gcc happier. Found while looking at something else for dlg@.
2013-07-16use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-07-16simplify some icky macros; from Jan Stary, tweaked by meJason McIntyre
2013-07-15remove non-standard section: it does nothing for this page;Jason McIntyre
2013-07-14merge the relevant bits of dhcp(8) into dhclient(8) and dhcpd(8),Jason McIntyre
removing traces of dhcp(8)... i'm about to remove that file, since it's essentially useless. holding off for a little, in case my commit is greeted with howls. help/ok krw
2013-07-11update (or add) STANDARDS;Jason McIntyre
help/ok krw
2013-06-04Fix "\" escape handling in read_string().Kenneth R Westerback
Problem noted, fix tested and ok sthen@.
2013-05-16poll(2) might have slept for an arbitrary amount of time. We shouldGerhard Roth
update 'cur_time' after poll(2) returns. ok otto
2013-04-22When sync'ing, look for lease by hwaddr and then ipaddr. Not hwaddrKenneth R Westerback
twice. Simplify logic. Fixes loops while sync'ing for sthen@. Spotted by & fixed tested by sthen@.
2013-04-20Remove extraneous "\n" erroneously introduced by move to strftime().Kenneth R Westerback
Spotted by sthen@.
2013-04-19Log (at LOG_INFO) which interfaces dhcpd listens to and (as suggested byStuart Henderson
krw) their address. As dhcpd uses BPF, it's not possible to find this information out from fstat/netstat. ok krw@
2013-04-17Replace hand-rolled date printing/parsing code with strftime()/strptime().Kenneth R Westerback
Use timegm() because all the dates are in UTC and the 'standard' routines can't handle the truth. Remove some 'time_t is 32bits' assumptions. Print 'UTC' at the end of dates in the leases file, rather than mentioning that all dates are UTC in a comment at the top of the file. Feedback and suggestions from guenther@, kettenis@, otto@, tedu@, deraadt@.
2013-04-13Give struct dhcp_synctlv_lease fields a prefix (lv_) as the fieldsKenneth R Westerback
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.
2013-04-13Don't dance with errno, just check the return values of fprintf(),Kenneth R Westerback
fputs() and fputc() to see if a failure occurred. Add a couple of missing checks. Replace putc() with fputc(). Shorter, nicer code. No functional change. ok fgsch@
2013-04-12Unbreak lease synchronization by making the sync header contain theKenneth R Westerback
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@.
2013-04-05send_packet() and writev() return ssize_t, not int. Use correctKenneth R Westerback
type to store the returned value. From dhill.
2013-03-22RFC 2131 4.3.1 seems clear that a server MUST NOT include theKenneth R Westerback
client-identifier option in OFFER or ACK messages. So stop doing so.
2013-03-11RFC 2131 says don't ACK any REQUEST messages that contain aKenneth R Westerback
server-identifier option that specifies a different dhcp server. So don't. Pointed put and fix tested by Andy via bugs@
2013-02-14Obey RFC 2131 and when the broadcast flag is set send reply backKenneth R Westerback
via udp broadcast and link-local broadcast. Not udp broadcast to link address of client. Fixes at least some switches who use the broadcast flag. Bug submitted by Andy via bugs@, and fix tested by same. Thanks! ok beck@
2013-02-03Remove unused (a.k.a. always passed NULL) parameter 'data' fromKenneth R Westerback
decode_udp_ip_header() and the useless check of it. Part of original diff from pelikan about udp length errors.
2013-01-13Tweak whitespace, add missing #defines, use DHO_RELAY_AGENT_INFORMATIONKenneth R Westerback
rather than DHO_DHCP_AGENT_OPTIONS. Makes these files identical again.
2013-01-13Add DHO_ defines for all known options. Use same names as ISC whereKenneth R Westerback
available. No functional change.
2013-01-05Check UDP length field for short as well as long values. Fixes aKenneth R Westerback
dhcpd crash when a UDP packet arrives saying it has 0 length. Spotted by Martin Pelikan, who also noted it was fixed a while ago in ISC DHCP 3.0b2p17. Fix tested by Martin. Thanks!
2013-01-03Don't mention the (incorrect) option number of autoproxy-script, sinceKenneth R Westerback
we don't mention the option numbers for other options. Noticed by Marcus Merighi vi tech@.
2013-01-02Rework to simply list all options in alphabetical order. FunctionalKenneth R Westerback
groupings and sub-ordering them in RFC/numerical order did not make for a readable man page. Add a number of missing option descriptions. Started by man page update from Marcus Merighi via tech@. Thanks! Further fixes and tweaks by jmc@. ok jmc@.
2012-09-26last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;
2012-08-29update the rfc references; ok krwJason McIntyre
2011-11-12Zero option processing stack storage to prevent stack garbage thatKenneth R Westerback
happens to look like options from being processed as options when truncated packets received. Potential problem pointed out by mikeb@, from a couple of NIST reports (CVE-2011-2748 and CVE-2011-2749).
2010-12-23Use the provided note() and warning() functions of dhcpd instead ofClaudio Jeker
calling syslog_r() directly -- this make -d work as expected. OK reyk@, stsp@, deraadt@
2010-12-15We run getopt() twice to know if dhcp-sync is used. To make this workClaudio Jeker
both getopt calls need the same optstring or the first getopt() call will end before parsing all arguments. Problem found and fixed supplied by m_athias OK millert@, deraadt@
2010-11-19Prevent dhcpd(8) from trying to listen on interfaces that don't have aAntoine Jacoutot
valid broadcast (e.g. pflog0). "no objection" krw@, ok claudio@
2010-10-08use the right capitalization in the Nd strings.Igor Sobrado
ok jmc@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-04-19If interfaces are specified, get their rdomain and bind dhcpd into the sameClaudio Jeker
domain with setrdomain(). This allows to run dhcpd on multiple rdomains. OK krw@