summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2018-04-17Document how to avoid isakmpd(8) source IP address pitfalls by usingStefan Sperling
the Listen-on directive in isakmpd.conf(5). This directive can be necessary in multi-homed situations, and if isakmpd(8) is used with carp(4). ok sthen@ mpi@
2018-04-11Two fixes in ping:Vadim Zhukov
1. Stop telling our PID to the world: the ident values could overlap anyway since PID space is larger than 16 bits for some time already. 2. No need for htons/ntohs dance with ident in IPv6 case. okay benno@ deraadt@ florian@
2018-04-07Display local timezone in all deadline estimates.cheloha
Admins don't necessarily reside in the same timezone as the machine. If an admin mistakenly schedules downtime for a machine at the wrong time this could be quite bad. Users, too, don't necessarily reside in the same timezone as the machine. Saying the box is going down at "15:40" is potentially ambiguous. So, display the local timezone in all logs, broadcasts, printouts, messages, etc. Give the admin a chance to correct the mistake; give the user a better idea of when the box is actually going down. This also updates the process' understanding of the present time before printing estimates. The system's wall clock could have changed after the shutdown was scheduled, making subsequent broadcasts potentially misleading for users. ok deraadt@
2018-04-06Round user input to cylinder boundaries more betterer.Kenneth R Westerback
Improve emitted verbiage while there. tweaks & ok otto@
2018-03-31The rarely used '-L' option does not need a PATH_MAX staticKenneth R Westerback
array. Just point at the provided optarg like '-l' does. Also, no need to initialize a static pointer to NULL.
2018-03-31Fix '-i' to discard previously defined values for the options to beKenneth R Westerback
ignored.
2018-03-31Move 'require' declaration into 'DHCP Options' sectionKenneth R Westerback
alongside 'request'.
2018-03-22The iked(8) fuzzer did not fuzz encrypted payloads. With that changedPatrick Wildt
the regression test uncovered code paths in the TS and CP payload parser that can trigger access to invalid memory locations. This changes the TS and CP payload parsing to add additional length checks. With hshoexer@ and markus@; OK sthen@
2018-03-20pretty_print_option() returns a pointer to a 0 length string, notKenneth R Westerback
NULL, on failure. Eliminates possible "option = ;' lines in lease files.
2018-03-19Disallow "++minutes".cheloha
strtonum(3) accepts a single leading '+', so if we increment timearg we allow input with two leading pluses. If we don't increment, we still have a valid input for strtonum(3). While here, use errstr to say what was wrong with timearg. Don't increase the range for offsets yet: it exposes segfaults elsewhere in the program that need to be addressed. ok millert@ tb@
2018-03-16clarify what the route priority does and what defaults are used.Sebastian Benoit
with suggestions from jmc and ok mpi@
2018-03-16improve markup quality in the cases found by the new "--" style messageIngo Schwarze
2018-03-16Consistently spell "IPsec" in comments and debug outputs.Martin Pieuchot
From Raf Czlonka, ok sthen@
2018-03-13RFC 7217 states (section 5, page 9):Florian Obser
| The Interface Identifier is finally obtained by taking as many | bits from the RID value (computed in the previous step) as | necessary, starting from the least significant bit. Copy bits from the end of the digest array, not from the beginning. While here initialize iid. Problem that IPv6 addresses change while they should not pointed out by semarie@. OK sthen, phessler
2018-03-10Avoid a race when populating an mfs fs by using a tmp dir and splitOtto Moerbeek
out the "wait for mount" code into a function to see more easily what is going on. ok visa@ tedu@
2018-03-08Check required partition size against the size of the largest freeKenneth R Westerback
chunk, not the total amount of free space on the disk. Removes need for 'totsecs'. ok otto@ as part of larger diff now completely committed
2018-03-08Calculate chunk size after adjusting both the chunk offset and chunkKenneth R Westerback
end in SUN_CYLCHECK case. Fixes potential off-by-one in calculating the number of cylinders available in a chunk. ok otto@ as part of larger diff
2018-03-08Instead of a SUN_CYLCHECK block in both parts of an if/else, with aKenneth R Westerback
goto from one to the other, just move the logic after the if/else. One less #ifdef. Decrements total_secs in either case. ok otto@ as part of larger diff
2018-03-08Bail out of a strategy early if the sum of the minsz values exceedsKenneth R Westerback
the space available. ok otto@ as part of larger diff
2018-03-08Bail out of a strategy early if it requires more partitions than areKenneth R Westerback
available. ok otto@ as part of larger diff
2018-03-08Simplify the strategy looping.Kenneth R Westerback
ok otto@ as part of larger diff
2018-03-08Back in the history of time, IPv4 had classes of addresses. This was widelyPeter Hessler
acknowledged as a failure. At the same time IPv4 classes were declared a failure, IPv6 decided to add them back because using a mac address for IP address configuration was easy. Now that we have RFC7217 support we can remove this artificial limitation: allow non-/64 prefixes to be configured by SLAAC. Of course, if you have fewer bits for the hosts part of the address you have fewer bits for privacy and fewer bits to avoid collisions. OK florian@
2018-03-07RFC 7136 clarifies that the "u" and "g" bits are only significant whenFlorian Obser
IPv6 unicast interface identifiers are derived from IEEE link-layer addresses. In all other cases the interface identifier should be treated as an opaque value. Accordingly stop fiddling with the bits for privacy addresses. While here initialize the whole priv_in6 struct with random data, currently no functional change but reduces amount of magic numbers, pointed out by phessler as part of a larger diff. OK phessler, sthen
2018-03-06Fix a small mistake from r1.229 causing sysctl(8) to print "newval -> newval"Tim van der Molen
instead of "oldval -> newval" when changing a string variable. OK florian@
2018-03-05Outsource enabling/disabling the DPD and keepalive timers for SAs intoPatrick Wildt
their own functions. Makes it easier to extend with other timers that work on established SAs and re-use the functionality in other places. Also delete the timer before adding to fix a warning on config reload in certain circumstances. ok sthen@
2018-03-04Add if (D_VENDOR) check to last SUN_CYLCHECK block lacking it.Kenneth R Westerback
While there move local variable declaration inside the 'if' and eliminate separate SUN_CYLCHECK block containing said local variable declaration. Add check for attempt to resize a partition to 0, and simplify logic a bit by recognizing that this means the number of sectors will always be > 0. ok otto@
2018-03-02Tweak a couple of long lines.Kenneth R Westerback
2018-03-02Always call get_cpg() after calling get_bsize(). InitializeKenneth R Westerback
p_cpg inside get_cpg() instead of separately, much like get_fsize() and get_bsize() work. ok otto@
2018-03-02Refactor the countdown loop() to simplify it.cheloha
If we insert our offset into tlist[] and then process tlist[] like an array we can eliminate many of the special cases and duplicate calls in loop(). While we're at it, change struct interval and timewarn() to use time_t to eliminate the need for some of the casting and add explicit long-long suffixes to the constants in tlist[] to head off overflow if the code wanders off. With type-related input from tb@ and a style tweak from anton@. ok tb@
2018-03-01Check for a negative value and overflow in getuint64() when performingTodd C. Miller
multiplication and division. Based on a diff from otto@. OK otto@ krw@
2018-03-01Don't overflow or underflow value when [+-] operatorsKenneth R Westerback
applied during getuint64()'s input parsing. ok otto@
2018-03-01Avoid underflow under SUN_CYLCHECK when rounding partition size toKenneth R Westerback
multiple of cylinder size. Eliminate various compiler warnings by shuffling unused variables under !SUN_CYLCHECK. Consolidate two SUN_CYLCHECK blocks into one. Add D_VENDOR check inside SUN_CYLCHECK block. Tweak & ok otto@
2018-03-01Check return value of getuint64() for ULLONG_MAX, andKenneth R Westerback
ULLONG_MAX - 1, not <= 0. This fixes the detection of ^D and invalid values during the 'R'esize command. ok otto@
2018-02-28Now that log_debug() has been decyphered, replace DPRINTF() instancesKenneth R Westerback
with log_debug() so -v unleashes all debug output without having to compile a custom dhclient.
2018-02-27Typo: 'tftp-server' -> 'tftp-server-name'.Kenneth R Westerback
Spotted by Pontus Lundkvis. Thanks!
2018-02-27handle "tunnels" without a destination addressDavid Gwynne
this is used for mgre, which has a local address but dynamically addresses other endpoints based on routing information. "tunneladdr" takes a single address (where "tunnel" takes two) and sets the destination address in the ioctl to an AF_UNSPEC destination. tunnel status is changed so it recognises this and only outputs the local address if the destination is AF_UNSPEC. the tunnel status is also changed so it can tell the difference between tunnels being unsupported on the interface (ie, ENOTTY comes back) or if there's just no address configured yet (EADDRNOTAVAIL), which allows the other tunnel params like ttl and df to be shown. tested with and without -DSMALL
2018-02-27Move fsize initialization into get_fsize() to eliminate duplication.Kenneth R Westerback
Ensure get_fsize() is always called before get_bsize(). And during (R)esize only call the pair a second time when a partition is actually shrunk. ok otto@
2018-02-25Bunch of whitespace fixes.Kenneth R Westerback
ok otto@
2018-02-24If you can modify p_cpg in when 'm'odifying a partition, you should beKenneth R Westerback
able to do the same when 'a'dding a partition. Only in 'X'pert mode of course. ok otto@
2018-02-24Replace popen/setjmp/pclose with a manual pipe/fork/exec/wait.cheloha
We can limit the time we wait on wall(1) without the complexity inherent to setjmp. Actually wait (instead of waitpid) to pick up any straggler wall processes from prior timewarn() calls. With a tweak from millert@ to ensure we don't accidentally close stdin before we exec wall. ok millert@ tb@
2018-02-24return early on some unhandled ioctls rather than err().David Gwynne
2018-02-23'partions' -> 'partitions', nuke some erroneous whitespace.Kenneth R Westerback
ok otto@
2018-02-23Add unsetrdomain() and option -rdomain to return an interface to routingakoshibe
domain 0. OK phessler, henning, deraadt, stsp, benno
2018-02-20make sure we've read the lenght bytes before checking the lengthOtto Moerbeek
ok benno@
2018-02-20Move getvnetflowid() out of #ifndef SMALL to unbreak 'make release'.Theo Buehler
Diff from jsg, ok millert, benno
2018-02-20tweak previous, with some help from dlg;Jason McIntyre
2018-02-20add support for toggling partitioning a vnetid into a netid and flowidDavid Gwynne
"vnetflowid" enables it on an interface, and "-vnetflowid" disables it. a vnetid will be suffixed with + on the encap line if it an interface reports that it is enabled.
2018-02-19(static) byte buffers are not aligned in any way, malloc the buffer toOtto Moerbeek
solve that. Prevents bus error on armv7. ok naddy@ florian@
2018-02-19tweak previous;Jason McIntyre
2018-02-19add support for setting and displaying whether a tunnel allows fragmentationDavid Gwynne
ifconfig will output "nodf" or "df" on tunnel interfaces that support the ioctl., and accepts "tunneldf" and "-tunneldf" as options to try and configure it.