summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2018-06-22Use __func__ in log_debug calls.rob
Ok gsoares@
2018-06-20This might have been a good idea 20 years ago but in this day and ageFlorian Obser
the compiler is probably better at unrolling loops. style nit fcambus OK phessler
2018-06-20dhclient.c r1.569 started writing some files before calling daemon(),Stuart Henderson
which involved doing a write_option_db() call at a different point in bind_lease(). However one of the parameters was in a variable that was also used for iterating a TAILQ so this did not have the intended contents (it was always NULL at the end of TAILQ_FOREACH*, resulting in a null deref when dhclient -L is used). Fix by using a new temporary variable. ok krw@
2018-06-18Pledge main process now that we have wroute.Florian Obser
2018-06-18Replace hardcoded constants with defineskn
OK mpi henning blum
2018-06-13Add a cloning direct route to the default route gateway when theKenneth R Westerback
gateway is not reachable via the IP address/netmask provided by the lease. Allows OpenBSD to work as well as iOS in certain weird/misconfigured/overly clever hotspots. A generalization of the handling of the /32 addresses handed out by Goggle Cloud, suggested by claudio@ Error in initial diff pointed out by henning@. Feedback from job@, mpi@, kn@. Tweaks & ok claudio@
2018-06-11Fix an off-by-one line count when using include statements.denis
Thanks to otto@ for the initial diff. OK benno@
2018-06-07add some EXIT STATUS sections; from matthew martinJason McIntyre
2018-06-07put ".Re" in the right place;Jason McIntyre
2018-06-06RFC 8106 obsolteted RFC 6106.Florian Obser
From brad@, OK jmc
2018-06-06After pledge the frontend process is only accepting fromFlorian Obser
an AF_UNIX socket (the control socket) so replace inet with unix pledge.
2018-06-04Zap unused sockaddr.kn
OK bluhm deraadt jca
2018-06-03Fix previous by restoring inadvertantly deleted check forKenneth R Westerback
get_recorded_lease() returning NULL. Should fix segmentation fault reported by Klemens Nanni on bugs@.
2018-05-28Remove unused <sys/param.h>kn
OK sthen mpi
2018-05-26Add more RFCs; found while preparing BSDCan slides.Florian Obser
2018-05-26In addition to "on" and "off", allow the audio "record.enable" mixerAlexandre Ratchov
knob to take the new "sysctl" value, which is the default. In this case, the device behavior is determined by the new "kern.audio.record" sysctl(2), which defaults to zero. ok florian
2018-05-23Some interfaces (e.g. cdce(4)) can't tell if they are connected. TheyKenneth R Westerback
always report a link status of UNKNOWN. Do not use recorded leases to configure such interfaces. In such cases only use the address in the recorded lease to ask for a new lease. Avoids debilitating /etc/resolv.conf changes by unplugged higher priority interfaces given to the tender mercies of dhclient after a working interface has already set /etc/resolv.conf correctly. Reported for cdce(4) by guenther@ at p2k18.
2018-05-19Add '-r', which causes running dhclient to releaseKenneth R Westerback
lease and exit. Man page tweaks from jmc@. Request, tests & ok tb@. ok millert@ on previous version.
2018-05-19Revert change that benno apparently commited by mistake and breaks buildMatthieu Herrb
on gcc architectures. ok florian@
2018-05-18A pf rule with a "on rdomain n" with nonexisting rdomain n will cause anSebastian Benoit
pfctl: DIOCADDRULE: Device busy error when loading the ruleset, with no information which rule caused the problem and no indication that the problem is the rdomain <nonexisting>. This diff makes pfctl check if the rdomain really exists when parsing the config. ok bluhm@
2018-05-18merge two ifndef small blocks; no functional changeFlorian Obser
2018-05-18dead stores; from llvm scan-buildFlorian Obser
2018-05-18typo, pointed out by llvm scan-build, how did this even work though?Florian Obser
2018-05-17Any IPv4 address change could alter which interface has the activeKenneth R Westerback
default route and thus 'owns' resolv.conf. So check if resolv.conf should be (re)written after all IPv4 RTM_NEWADDR or RTM_DELADDR messages.
2018-05-17Handle RTM_DELETE of slaacd managed default route by re-inserting it.Florian Obser
Problem pointed out & OK phessler
2018-05-17Fully align this with route(8); no need to be different here and mightFlorian Obser
help us if we ever get rid of KAME hack.
2018-05-17Introduce SLAACD_RTA_LABEL define to not use a string constant allFlorian Obser
over the place.
2018-05-16Always record the client identifier used to obtain a lease. ServersKenneth R Westerback
obeying RFC 2131 will never echo the identifier in OFFER/ACK packets. Servers obeying RFC 6842 will always echo the identifier. Confused servers may or may not do the echoing. This permits more reliable association of recorded leases with the MAC address in use at the time the lease was obtained. Requested by & ok tb@
2018-05-16Create all sockets with SOCK_CLOEXEC, we never want to hold on to themFlorian Obser
over execve(2).
2018-05-15typo in log messageFlorian Obser
2018-05-15drop unused <time.h>cheloha
ok kn@ mpi@
2018-05-12Document current behaviour of 'ignore' directive and 'append',Kenneth R Westerback
'prepend', 'default' and 'supersede' directives with respect to 'ignore'. Document 'filename', 'fixed-address', 'next-server' and 'server-name' directives.
2018-05-12log_procnames[] needs to be in sync with slaacd_process enum otherwiseFlorian Obser
processes have the wrong process title leading to confusion.
2018-05-12Make LACP_STATE_BITS accessible to userlandccardenas
Update ifconfig to display LACP State (Actor and Partner) on each trunk port Ok benno@, phessler@, and tb@
2018-05-11Write out updated dhclient.leases.<if>, /etc/resolv.conf and any -LKenneth R Westerback
file before going daemon. Alleviates a race scripts (e.g. the installer in autoinstall mode) can encounter under the reasonable assumption that all related information is available when dhclient(8) returns control to the script as a result of going daemon. Pointed out by rpe@.
2018-05-09Fix (include file ) line number counting by keeping track of the ungetOtto Moerbeek
buffer per file; also use that buffer to expand macros. ok sashan@ dennis@ krw@
2018-05-07Add the logging parameters to mousecfg.c, and make the 'param' fieldUlf Brosziewski
available for all wsmouse devices.
2018-05-05document unit value for pltime and vltime;Jason McIntyre
from paul de weerd ok kn
2018-05-02sort;Jason McIntyre
2018-05-01Mention RFC 7217 and RFC 7772Florian Obser
2018-05-01The -d flag should be a no-op in monitor mode since it does not modifyFlorian Obser
the routing table. However, if -d is provided route monitor lists all interfaces and their associated addresses and exits. This is confusing, unexpected and no longer needed (if ever). Make -d a proper no-op for route monitor and get rid of the interfaces function which didn't use the correct sysctl idiom anyway. OK benno
2018-05-01Sync p_rttables() to netstat(1) version. Pointed out by claudio andFlorian Obser
mpi. Remaining differences are pledge and priority handling which only route(8) has. While here switch flushroutes to get_sysctl() function. OK benno
2018-04-30* simplify code by no longer calling getnetbyname(3)Ingo Schwarze
* avoid double lookups for unresolvable names without -net * more fitting error message for unresolvable names after -net OK florian@
2018-04-30tableid is either initialized to the current routing table or to theFlorian Obser
one specified by the T flag. No need to pass a flag around if the tableid is valid. It always is. This code is now in sync between flushroutes() and p_rttables(). OK benno, no objection claudio
2018-04-30No need to get the whole routing table from the kernel if we areFlorian Obser
filtering by address family and / or priority; similar to what p_rttables() is doing. (At the time of writing we need to copy about 150MB for the whole table on a router that is in the default free zone). OK benno
2018-04-30Fix route monitor -AF filter.Florian Obser
While here make and to see that this is correct and not touching any global state make af a local variable and pass it around. Input & OK benno
2018-04-28remove references to /etc/networks; reminded by jmc@Ingo Schwarze
2018-04-28Improve / simplify pledges.Florian Obser
1) after schwarze@'s rampage (thanks!) we can drop rpath since asr is no longer opening /etc/networks behind our back 2) we have the "route" pledge for the NET_RT_DUMP sysctl so we can pledge earlier in main; flushroutes() and p_rttables() now tighten the pledge instead of being the first pledge 3) the pledge in monitor() was just a repeat of the main() pledge, it can go. OK schwarze, deraadt
2018-04-28Ignore SIGPIPE in case a TCP client resets the connectPhilip Guenther
ok otto@
2018-04-27Add getnumber() to extract simple deciaml values from theKenneth R Westerback
user. Doesn't handle units, '*', etc. Replace the more complex getuint64 when getting things like the number of tracks per cylinder. ok otto@