summaryrefslogtreecommitdiff
path: root/usr.sbin/rarpd
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-01-22PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() callsKenneth R Westerback
where the "wrong" #define was used. ok dlg@
2018-08-07Unveil is used at tail of initialization to allow "r" of /tftpbootTheo de Raadt
(that decides whether rarpd should reply), and /etc/ethers "r" for debug reporting.
2018-06-01Just over 15 years and 35 revisions ago, itojun removed the last use ofTheo Buehler
SIOCGIFNETMASK in #ifdef'ed out code. Adjust two comments accordingly.
2018-04-26Use <fcntl.h> instead of <sys/file.h> for open() and friends.Philip Guenther
Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
2017-04-19Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has beenMartin Natano
around for two releases, it should be safe to do so. ok bluhm deraadt sthen tb yasuoka
2017-01-20Oops. one "error(NONFATAL,..." got flipped to "error(...)" insteadKenneth R Westerback
of "warning(...)". Spotted by & ok procter@
2017-01-20Split error() into error() and warn() so that error() can be markedKenneth R Westerback
__dead and thus let gcc sleep at night. ok tb@ beck@
2016-12-18Nuke more unused variables.Kenneth R Westerback
ok millert@
2016-08-27Pull in <sys/time.h> for gettimeofday()Philip Guenther
ok deraadt@
2016-07-25Fix rarpd hang. The receive buffer of a route socket can become fullVisa Hankala
while rarpd process is idle. To avoid getting stuck in rtmsg(), the process has to clear the buffer and retry. ok benno@ deraadt@ millert@
2016-05-28Replace the /dev/bpf* open loop with a plain open("/dev/bpf0", ...).Martin Natano
ok deraadt jca
2016-01-26Use an unsigned int rather than an int when iterating through all 32mmcc
bits in the form: for (i = 1; i; i <<= 1) This avoids undefined operations when shifting into and out of the highest-order bit. ok millert@
2015-11-19hoist the SOCK_RAW setup to the top before pledgeTheo de Raadt
issues discovered by sebastia comments from semarie
2015-11-13pledge "stdio rpath dns" right at the start of the servicing loop.Theo de Raadt
Commiting to gather reports.
2015-10-28pid removal; from jan staryJason McIntyre
2015-10-27Consistency in error messages.Jeremie Courreges-Anglas
No functional change.
2015-10-26remove libutil from dpadd tooTed Unangst
2015-10-26remove util.h include and -lutil after pidfile removalJoerg Jung
ok deraadt
2015-10-26stop using pidfile()Theo de Raadt
ok benno jung jca
2015-10-16use daemon(), jca had the same diff in his treeTheo de Raadt
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
ok millert krw
2015-08-03Explicitly request the sockaddr_dl when doing a RTM_GET rather thanMartin Pieuchot
assuming that it will be in the gateway sa. Fixes a regression introduced with the support of multiple connected routes, found the hardway by sebastia@. ok florian@, benno@, deraadt@
2015-07-16typoMiod Vallat
2015-01-19Routing sockets are here to stay, so delete the wrapper that would use thePhilip Guenther
defunct ioctl(SIOCSARP) ok millert@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-12-16Replace setpgrp(0, getpid()) with setpgid(0, 0). OK deraadt@ tedu@Todd C. Miller
2014-10-31convert select() to poll(). Bit more complicated here. Some interestingTheo de Raadt
discussion with millert about POLLHUP, which is not needed here because this is a bpf description, but indicates we need to consider that elsewhere. ok millert
2014-10-29delete obscure workaround for a bug in SunOS.Theo de Raadt
(But leave the VMS workaround intact)
2014-10-08KNFTheo de Raadt
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2013-11-12handle lack of prototypeTheo de Raadt
2013-08-15Reduce the warnings when arp, rarp, ndp are compiled with WARNINGS=yes.Alexander Bluhm
warning: declaration of 'time' shadows a global declaration No binary change; OK lteo@ florian@ henning@ mikeb@ millert@
2013-07-20Add missing RCS id.Alexander Bluhm
2013-07-20arp and rarpd used an int expire_time for time calculation. ConvertAlexander Bluhm
this into time_t. OK benno@
2012-09-26last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;
2012-04-06BIOCGBLEN is using a u_int, not an intTheo de Raadt
and casting to size_t for malloc is better
2010-08-29remove unused variableCharles Longeau
ok jsg@ krw@
2010-08-26remove a silly comment that duplicates the usage string at the start ofJonathan Gray
the file. spotted by jmc@
2010-08-26Allow multiple interfaces to be specified instead of all or one.Jonathan Gray
ok krw@ claudio@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-06-25Another copy another missing RTM_VERSION check.Claudio Jeker
Tested and OK sthen@, OK henning@
2009-06-05rtm->rtm_hdrlen conversionChris Cappuccio
ok claudio@, henning@
2008-05-23hexidecimal -> hexadecimalIgor Sobrado
ok jmc@
2008-05-18some minor fixes;Jason McIntyre
2008-05-17documentation tweaks.Igor Sobrado
ok (some time ago) jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2006-04-02use SEEK_* for lseek()Theo de Raadt
2006-01-23Include <sys/param.h> instead of <sys/types.h> so we get MAXHOSTNAMELENTodd C. Miller
2005-12-21Userland programs should include <errno.h> not <sys/errno.h>Todd C. Miller
OK deraadt@