aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
...
* Now that hell is fully frozen it is good time to add IPv6 support to HAST.Pawel Jakub Dawidek2011-05-201-75/+116
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=222118
* Allow [ ] characters in strings. They might be used in IPv6 addresses.Pawel Jakub Dawidek2011-05-201-1/+1
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=222117
* Rename tcp4 to tcp in preparation for IPv6 support.Pawel Jakub Dawidek2011-05-202-93/+93
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=222116
* Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.Pawel Jakub Dawidek2011-05-202-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=222115
* In preparation for IPv6 support allow to specify multiple addresses toPawel Jakub Dawidek2011-05-194-68/+215
| | | | | | | | | listen on. MFC after: 3 weeks Notes: svn path=/head/; revision=222108
* - Add support for AF_INET6 sockets for %S format character.Pawel Jakub Dawidek2011-05-181-7/+26
| | | | | | | | | | | - Use inet_ntop(3) instead of reimplementing it. - Use %hhu for unsigned char instead of casting it to unsigned int and using %u. MFC after: 1 week Notes: svn path=/head/; revision=222087
* mdoc:Sergey Kandaurov2011-05-171-2/+2
| | | | | | | | - use a proper macro for interface name ipfw0. - add missing section number for bpf cross reference. Notes: svn path=/head/; revision=222023
* Some partitioning schemes want to have partitions that are alignedAndrey V. Elsukov2011-05-151-10/+14
| | | | | | | | | | | | | | | | with geometry. And they do recalculation of user specified parameters. MBR, PC98, VTOC8, EBR schemes are doing that. For these schemes an auto alignment feature (ie. gpart add -a alignment) would not work. But it can work for GPT and BSD schemes. BSD scheme usualy is created inside MBR, so we can use knowledge about offset of MBR partition to calculate aligned values for BSD partitions. Use "offset" attribute of the parent provider for better alignment. MFC after: 2 weeks Notes: svn path=/head/; revision=221967
* When setting media always and not just in case of switching to IFM_AUTOMarius Strobl2011-05-151-5/+1
| | | | | | | | | | | | | | | | | | | | | clear the options of the current media, i.e. only inherit the instance, which matches what NetBSD does. Without this it's really non-intuitive that the following sequence: ifconfig bge0 media 1000baseT mediaopt full-duplex ifconfig bge0 media 100baseTX results in 100baseTX full-duplex to be set or that: ifconfig bge0 media autoselect mediaopt flowcontrol ifconfig bge0 media 1000baseT mediaopt full-duplex tries to set 1000baseT full-duplex with flowcontrol, which isn't suported und thus fails while the following: ifconfig re0 media 1000baseT mediaopt flowcontrol,full-duplex ifconfig re0 media autoselect just switches to autoselection without flowcontrol. MFC after: 2 weeks Notes: svn path=/head/; revision=221954
* Simplify the code a bit. For own providers GEOM_PART always providesAndrey V. Elsukov2011-05-151-61/+14
| | | | | | | | | "start" and "end" config attributes. MFC after: 1 week Notes: svn path=/head/; revision=221952
* Currently we are unable to use capsicum for the primary worker process,Pawel Jakub Dawidek2011-05-145-22/+44
| | | | | | | | | | | | | | | | | | | | because we need to do ioctl(2)s, which are not permitted in the capability mode. What we do now is to chroot(2) to /var/empty, which restricts access to file system name space and we drop privileges to hast user and hast group. This still allows to access to other name spaces, like list of processes, network and sysvipc. To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict access to process table, network (we use ip-less jails) and sysvipc (if security.jail.sysvipc_allowed is turned off). This provides much better separation. MFC after: 1 week Notes: svn path=/head/; revision=221899
* When using capsicum to sanbox, still use other methods first, just in casePawel Jakub Dawidek2011-05-141-10/+13
| | | | | | | one of them have some problems. Notes: svn path=/head/; revision=221898
* Typo. For USB devices, 'serial' should be 'sernum'.Bruce M Simpson2011-05-101-1/+1
| | | | | | | See sys/dev/usb/usb_device.c for what devctl_notify() gets. Notes: svn path=/head/; revision=221719
* We now have multiple filesystems (UFS, ZFS, ...), so for tools that onlyGavin Atkinson2011-05-083-8/+8
| | | | | | | | | | | operate on one type of filesystem, mention this. While here, capitalise the use of "UFS" in growfs.8 to match other uses of the term in other man pages. MFC after: 1 week Notes: svn path=/head/; revision=221659
* Allow to specify remote as 'none' again which was broken by r219351, wherePawel Jakub Dawidek2011-05-081-1/+8
| | | | | | | | | | 'none' was defined as a value for checksum. Reported by: trasz MFC after: 1 week Notes: svn path=/head/; revision=221643
* Document the following sysctls:Pawel Jakub Dawidek2011-05-081-2/+22
| | | | | | | | | | | | kern.geom.eli.version kern.geom.eli.key_cache_limit kern.geom.eli.key_cache_hits kern.geom.eli.key_cache_misses MFC after: 1 week Notes: svn path=/head/; revision=221633
* Fix isitme(), which is used to check if node-specific configurationMikolaj Golub2011-05-081-1/+3
| | | | | | | | | | belongs to our node, and was returning false positive if the first part of a node name matches short hostname. Approved by: pjd (mentor) Notes: svn path=/head/; revision=221632
* Implemented a mount option "nocto" that disables cache coherencyRuslan Ermilov2011-05-041-1/+12
| | | | | | | | | | | checking at open time. It may improve performance for read-only NFS mounts. Use deliberately. MFC after: 1 week Reviewed by: rmacklem, jhb (earlier version) Notes: svn path=/head/; revision=221436
* Add "-a alignment" option to gpart(8). When it specified gpart(8)Andrey V. Elsukov2011-05-032-27/+99
| | | | | | | | | | tries to align partition start offset and size to be multiple of alignment value. MFC after: 2 weeks Notes: svn path=/head/; revision=221363
* recoverdisk(8): treat output file consistently and abort on EINVALUlrich Spörlein2011-05-012-26/+42
| | | | | | | | | | | | | | | | | | This improves usability a little as we no longer require using touch. Also reword the manpage wrt. parameters and fix usage() [1] With no media in a cd(4) drive, the reads will loop producing EINVAL, abort in that case [2]. Document the shortcoming of sectorsize and MAXPHYS (a quick solution to this might be having MAXPHYS as the "bigsize", in short testing it didn't make a difference on throughput). Submitted by: arundel [1] PR: bin/154528 [2] Notes: svn path=/head/; revision=221304
* Fix the Makefile for mount_nfs so that it creates aRick Macklem2011-05-011-1/+1
| | | | | | | link for mount_oldnfs.8 instead of mount_newnfs.8. Notes: svn path=/head/; revision=221288
* Add an -E option to mirror newfs's. The idea is that if you have a systemDag-Erling Smørgrav2011-04-295-7/+67
| | | | | | | | | | | | | | | | | | | | | | that was built before ffs grew support for TRIM, your filesystem will have plenty of free blocks that the flash chip doesn't know are free, so it can't take advantage of them for wear leveling. Once you've upgraded your kernel, you enable TRIM on the filesystem (tunefs -t enable), then run fsck_ffs -E on it before mounting it. I tested this patch by half-filling an mdconfig'ed filesystem image, running fsck_ffs -E on it, then verifying that the contents were not damaged by comparing them to a pristine copy using rsync's checksum functionality. There is no reliable way to test it on real hardware. Many thanks to mckusick@, who provided the tricky parts of this patch and reviewed the final version. Reviewed by: mckusick@ MFC after: 3 weeks Notes: svn path=/head/; revision=221233
* Somewhere around the 473rd time I mistyped "mdconfig file" instead ofDag-Erling Smørgrav2011-04-292-20/+49
| | | | | | | | | | "mdconfig -f file", I decided that it would be easier to make mdconfig DWIM than to teach my fingers to type the correct command line. MFC after: 3 weeks Notes: svn path=/head/; revision=221232
* Another man page update related to the switchover of theRick Macklem2011-04-291-2/+2
| | | | | | | | | | NFS clients done by r221124. This is a content change. Submitted by: jh Notes: svn path=/head/; revision=221194
* Update man pages related to the change in default NFS clientRick Macklem2011-04-281-4/+8
| | | | | | | | | applied by r221124. I also deleted references to idmapd, since that daemon no longer exists. This is a content change. Notes: svn path=/head/; revision=221145
* whitespace nit - sorry for the churnDag-Erling Smørgrav2011-04-271-2/+2
| | | | Notes: svn path=/head/; revision=221144
* whitespace nitDag-Erling Smørgrav2011-04-271-1/+1
| | | | Notes: svn path=/head/; revision=221143
* This patch changes head so that the default NFS client is now the newRick Macklem2011-04-273-11/+7
| | | | | | | | | | | | | | | | | NFS client (which I guess is no longer experimental). The fstype "newnfs" is now "nfs" and the regular/old NFS client is now fstype "oldnfs". Although mounts via fstype "nfs" will usually work without userland changes, an updated mount_nfs(8) binary is needed for kernels built with "options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and mount(8) binaries are needed to do mounts for fstype "oldnfs". The GENERIC kernel configs have been changed to use options NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER. For kernels being used on diskless NFS root systems, "options NFSCL" must be in the kernel config. Discussed on freebsd-fs@. Notes: svn path=/head/; revision=221124
* Mechanical whitespace cleanup.Dag-Erling Smørgrav2011-04-276-36/+35
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=221110
* Fix boo-boo in previous commit.Dag-Erling Smørgrav2011-04-271-7/+7
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=221108
* Alphabetize the options. No date bump since no actual change to the text.Dag-Erling Smørgrav2011-04-271-4/+4
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=221107
* Add missing ifdef. This fixes build with NO_OPENSSL.Mikolaj Golub2011-04-261-0/+2
| | | | | | | | | Reported by: Pawel Tyll <ptyll@nitronet.pl> Approved by: pjd (mentor) MFC after: 1 week Notes: svn path=/head/; revision=221078
* Rename HASTCTL_ defines, which are used for conversion between mainMikolaj Golub2011-04-263-7/+6
| | | | | | | | | | | | | hastd process and workers, remove unused one and set different range of numbers. This is done in order not to confuse them with HASTCTL_CMD defines, used for conversation between hastctl and hastd, and to avoid bugs like the one fixed in in r221075. Approved by: pjd (mentor) MFC after: 1 week Notes: svn path=/head/; revision=221076
* For conversation between hastctl and hastd we should use HASTCTL_CMDMikolaj Golub2011-04-261-5/+5
| | | | | | | | | | defines. Approved by: pjd (mentor) MFC after: 1 week Notes: svn path=/head/; revision=221075
* Fix assert messages.Mikolaj Golub2011-04-261-2/+2
| | | | | | | Approved by: pjd (mentor) Notes: svn path=/head/; revision=221074
* Stop trying to zero UFS1 superblocks if we fall off the end of the disk.Colin Percival2011-04-261-1/+4
| | | | | | | | | | | | | This avoids a potentially many-hours-long loop of failed writes if newfs finds a partially-overwritten superblock (or, for that matter, random garbage which happens to have superblock magic bytes); on one occasion I found newfs trying to zero 800 million superblocks on a 50 MB disk. Reviewed by: mckusick MFC after: 1 week Notes: svn path=/head/; revision=221049
* Revert r220907 and r220915.Adrian Chadd2011-04-221-5/+3
| | | | | | | | Changing the size of struct ieee80211_mimo_info changes the STA info data, breaking ifconfig in general. Notes: svn path=/head/; revision=220935
* Change the MIMO userland export ABI to include flags, number of radio chains,Adrian Chadd2011-04-211-3/+5
| | | | | | | | | extended EVM statistics and EXT channel data. ifconfig still displays 3 chains worth of ctl noise/rssi. Notes: svn path=/head/; revision=220907
* Correct comment.Pawel Jakub Dawidek2011-04-201-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=220899
* When we become primary, we connect to the remote and expect it to be inPawel Jakub Dawidek2011-04-202-13/+56
| | | | | | | | | | | | | secondary role. It is possible that the remote node is primary, but only because there was a role change and it didn't finish cleaning up (unmounting file systems, etc.). If we detect such situation, wait for the remote node to switch the role to secondary before accepting I/Os. If we don't wait for it in that case, we will most likely cause split-brain. MFC after: 1 week Notes: svn path=/head/; revision=220898
* If we act in different role than requested by the remote node, log itPawel Jakub Dawidek2011-04-201-1/+1
| | | | | | | | | as a warning and not an error. MFC after: 1 week Notes: svn path=/head/; revision=220890
* Timeout must be positive.Pawel Jakub Dawidek2011-04-201-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=220889
* When calling XPT_REL_SIMQ to ajust number of openings, do not try to reallyAlexander Motin2011-04-201-0/+1
| | | | | | | | release device. We haven't frozen the device before and attempt to release it will at least cause warning message from kernel. Notes: svn path=/head/; revision=220887
* Scenario:Pawel Jakub Dawidek2011-04-192-0/+20
| | | | | | | | | | | | | | | | | | | | | | - We have two nodes connected and synchronized (local counters on both sides are 0). - We take secondary down and recreate it. - Primary connects to it and starts synchronization (but local counters are still 0). - We switch the roles. - Synchronization restarts but data is synchronized now from new primary (because local counters are 0) that doesn't have new data yet. This fix this issue we bump local counter on primary when we discover that connected secondary was recreated and has no data yet. Reported by: trociny Discussed with: trociny Tested by: trociny MFC after: 1 week Notes: svn path=/head/; revision=220865
* Rewrite NAT configuration parser, so that memory allocation size isGleb Smirnoff2011-04-191-186/+189
| | | | | | | | | calculated dynamically. PR: kern/143653 Notes: svn path=/head/; revision=220835
* Furthermore condition IP waiting behaviour also on -dynamic flag.Maxim Sobolev2011-04-181-4/+8
| | | | | | | | | This should preserve POLA in all other cases (foreground || non-dynamic). MFC after: 2 weeks Notes: svn path=/head/; revision=220808
* Only wait for the IP to appear on the interface if natd is running in theMaxim Sobolev2011-04-181-5/+5
| | | | | | | | | | | | | | background. Suggested by: Garrett Cooper <yanegomi@gmail.com> Use EAGAIN instead of magic value of -2 to report this condition from the SetAliasAddressFromIfName routine. MFC after: 2 weeks Notes: svn path=/head/; revision=220806
* More whitespace fixes.Gleb Smirnoff2011-04-184-41/+41
| | | | | | | Checked with: md5, diff -x -w Notes: svn path=/head/; revision=220804
* Whitespace fixes.Gleb Smirnoff2011-04-186-268/+266
| | | | | | | Checked with: md5, diff -w Notes: svn path=/head/; revision=220802
* Changed "conscontrol unset" to accept an existing virtualRuslan Ermilov2011-04-182-24/+12
| | | | | | | | | | console device as an argument. Unsetting virtual console using /dev/console seems to have never worked. MFC after: 3 days Notes: svn path=/head/; revision=220801