summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2015-03-12automatic parent interface selection does not work anymore (see rev.Sebastian Benoit
1.245 of sys/netinet/ip_carp.c), carpdev is a required argument now. ok florian
2015-03-12Only read time information from the received packet if it is bigFlorian Obser
enough. OK deraadt@
2015-03-12replace bcopy with memcpyDavid Gwynne
2015-03-12bump the size of the time types on the wire to 64bit, and use nsecDavid Gwynne
instead of usec so its easier to translate to/from timespecs instead of timevals. ok deraadt@ florian@
2015-03-11port src/sbin/ping/ping.c r1.115.David Gwynne
> use clock_gettime(CLOCK_MONOTONIC) to get timestamps to measure the > interval between sending a ping and getting a reply for it. > > this makes it resistant against local wall clock changes, which can > skew the intervals reported or make them go negative. requested by deraadt@ florian@
2015-03-11use clock_gettime(CLOCK_MONOTONIC) to get timestamps to measure theDavid Gwynne
interval between sending a ping and getting a reply for it. this makes it resistant against local wall clock changes, which can skew the intervals reported or make them go negative. ok deraadt@ florian@ makes sense to lots of others
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-26%% not % in error message; ok millert@ henning@Stuart Henderson
2015-02-15Use "In" to mark up include files, instead of wrongly wrapping with Aq.Anthony J. Bentley
Aq is not the same as <> in non-ASCII situations, so this caused incorrect output in some places. And it provided no semantics besides. ok schwarze@
2015-02-15convert bcmp to memcmpTed Unangst
ok doug millert miod
2015-02-15These functions turned up in my grep for bcmp. There are already perfectlyTed Unangst
good cmp functions written for qsort, but then different versions were written which (ab)use the fact that bsearch doesn't strictly require the key type to be the same as the element type. Nevertheless, I think it's clearer and cleaner to create a complete key struct and search with that. As a bonus, we don't need two different compare functions just to compare with two different encoding values. ok millert
2015-02-14Rather than using 0xff as a placeholder for "don't check prio", use 0xff toStuart Henderson
mean "prio is 0". This avoids the need for code changes in programs which add pf rules (as was done in pfctl but not other programs) to handle the new "check prio" functionality. Specifically this unbreaks ftp-proxy. Use of #define rather than magic 0xff suggested by benno. ok benno "if henning doesnt like it he can change it when he recovers from jet-lag"
2015-02-13Direct people to netstat for the new multicast routing sysctls.Philip Guenther
problem noted by dcoppa@ ok claudio@
2015-02-10since we inherit prio (as in, the queuing priority) from outside sources,Henning Brauer
i. e. on vlan interfaces, it is useful to be able to match on it - effectively matching on classification done elsewhere. i thought i had long implemented that, but chrisz@ asking for it made me notice that wasn't the case. tests by chrisz, ok phessler pelikan
2015-02-10Groundwork for better route support over multiple interfaces byKenneth R Westerback
using RTM_IFA to bind routes to an interface. Keep the subnet route conflict avoidance code for the time being. diff from claudio@ as part of larger routing magic diff. ok claudio@ mpi@
2015-02-10If 'write' is issued after a 'reinit' command, and the MBR to beKenneth R Westerback
written does not contain an EFI partition, zap any GPT signature found on the 2nd (LBA 1) and last sectors on the disk. The install script uses this sequence. This is a temporary workaround until more GPT support is imported post-5.7. Should fix at least some machines who insist on using the GPT even after we have overritten the 'protective' MBR. ok deraadt@ tedu@ beck@ millert@
2015-02-09provide a net.inet6.ip6.ifq sysctl so people can see and fiddleDavid Gwynne
with the ip6intrq. ok claudio@
2015-02-09Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. RenameKenneth R Westerback
'User_modify' to 'USER_edit' for the same reason.
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-02-08Get rid of a bunch of memset()'s where struct variables and arraysKenneth R Westerback
are clearly properly initialized in the same area. Prompted by the recent shrinkage of most imsg structs.
2015-02-07parse debug levels with strtonum, so that debug 1banana doesn't parse.Ted Unangst
ok mikeb
2015-02-07Add support for interface-mtu (option 26).Kenneth R Westerback
Original request+diff from matthew@ ok dlg@
2015-02-07When getopt processing flags, many should be flag=1 instead of flag++Theo de Raadt
ok tedu miod
2015-02-07GC unused parameters now that ifname and rdomain are not used inKenneth R Westerback
constructing imsgs. ok reyk@
2015-02-06Better size_t overflow check for mount_mfs. OK miod@Todd C. Miller
2015-02-06convert atoi to strtonumTed Unangst
2015-02-06unneeded getopt.hTheo de Raadt
2015-02-06The write_file() privsep interface was too permissive andReyk Floeter
theoretically allowed the unprivileged child process to write to arbitrary files. Restrict it by replacing it with two specific write_resolv_conf() and write_option_db() privsep interfaces where all the critical decision has been moved to the parent. OK krw@
2015-02-06matthew@ points out that it's a bad idea to rely on the non-privileged,Kenneth R Westerback
network-facing process to properly fill out the interface name and rdomain on which operations are to be performed. Instead, always use the interface name and rdomain discovered before forking and dropping privs. Lets all the imsg structs to drop a couple of members. ok matthew@ henning@
2015-02-06Don't let errors leak the memory returned by getifaddrs().Kenneth R Westerback
2015-02-06Remove route/netstat -f encap in favor of ipsecctl -s flow.Reyk Floeter
OK deraadt@
2015-02-05Use sizeof(struct X) rather than sizeof(*p) in calloc() invocations.Kenneth R Westerback
History indicates this is slightly less error prone. Inconsistant usage pointed out by Benjamin Baier.
2015-02-05implement "ifconfig <if> -inet", removing all inet addressesHenning Brauer
for symmetry with -inet6 mostly. ok phessler theo
2015-02-02replace the wireless scan example with one showing how to select monitorJason McIntyre
mode: the wireless pages already carry the scan example, and this one seems a fair substitute; the diff is from bradain foley, tweaked according to some suggestions from stsp;
2015-02-01free(NULL) works, so stop checking for non-zero length allocationKenneth R Westerback
or non-NULLness before calling free(). This batch from Benjamin Baier.
2015-01-31free(NULL) works, so stop checking for non-zero length allocationKenneth R Westerback
or non-NULLness before calling free().
2015-01-31Don't leak the "access protected, zero sized object" returned byKenneth R Westerback
calloc(N, 0). Avoid the whole controversy by skipping zero length options while cloning a lease. Leak reported by Remco van den Berg via bugs@. Additional testing and diagnostic help from Benjamin Baier. Thanks!
2015-01-31Set is_static to 0 before trying to free a lease. Otherwise itKenneth R Westerback
might leak. *Should* not be possible but better safe than sorry.
2015-01-31Always free(buf) if errmsg is set while trying to flush routes.Kenneth R Westerback
2015-01-30Don't leak incompletely cloned static lease. Should never happenKenneth R Westerback
but better safe than sorry. Noted and diff from Benjamin Baier. Thanks!
2015-01-30Tweak error message to say 'realloc' since that's what's failing,Kenneth R Westerback
not 'malloc'.
2015-01-21Include <netinet/in.h> before <net/pfvar.h>. In a future change whenTheo de Raadt
ports is ready, <net/pfvar.h> will stop including a pile of balony.
2015-01-21Build the argument list for halt/reboot without excessive use ofChristian Weisgerber
the conditional operator. Adapted from NetBSD. ok miod@
2015-01-21Use plain "-p" to specify "halt and power down", for consistencyChristian Weisgerber
and compatibility with other BSDs. Adapted from FreeBSD. Still permit the combination "-hp" as requested by many. ok sthen@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-20Rewrite to void using union sockaddr_unionTheo de Raadt
ok mikeb
2015-01-19DEFAULT_PRIORITY and DEFAULT_QLIMIT no longer usedTheo de Raadt
2015-01-19remove #ifndef #define blocks trying to handle lack of BUFSIZTheo de Raadt
ok millert
2015-01-19Remove unnecessary <netinet/ip_ipsp.h> includesMike Belopuhov
2015-01-18do not require <a.out.h>Theo de Raadt