summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Kill custom in_matroute() radix mathing function removing one rte mutex lock.melifaro2014-11-113-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially in_matrote() in_clsroute() in their current state was introduced by r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them in route table, setting RTPRF_OURS flag and some expire time. After that, either GC came or RTPRF_OURS got removed on first-packet. It was a good solution in that days (and probably another decade after that) to keep TCP metrics. However, after moving metrics to TCP hostcache in r122922, most of in_rmx functionality became unused. It might had been used for flushing icmp-originated routes before rte mutexes/refcounting, but I'm not sure about that. So it looks like this is nearly impossible to make GC do its work nowadays: in_rtkill() ignores non-RTPRF_OURS routes. route can only become RTPRF_OURS after dropping last reference via rtfree() which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes. Dynamic routes can still be installed via received redirect, but they have default lifetime (no specific rt_expire) and no one has another trie walker to call RTFREE() on them. So, the changelist: * remove custom rnh_match / rnh_close matching function. * remove all GC functions * partially revert r256695 (proto3 is no more used inside kernel, it is not possible to use rt_expire from user point of view, proto3 support is not complete) * Finish r241884 (similar to this commit) and remove remaining IPv6 parts MFC after: 1 month
* Attempt to report a better error if sanitize is not supportedbryanv2014-11-091-8/+24
| | | | MFC after: 1 month
* Report the 1-based key numbers rather than the 0-based ones to be consistent.phk2014-11-092-5/+18
| | | | | | | Fix documentation for destroy command. Not sure how the wrong explanation happened. Spotted by: mwlucas
* Overhaul if_gre(4).ae2014-11-071-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 Differential Revision: D1023 No objections from: net@ Relnotes: yes Sponsored by: Yandex LLC
* fsirand does not actually use libutilbapt2014-11-051-2/+0
|
* Put "break" after err() to please coverity.melifaro2014-11-041-0/+1
| | | | | Reported by: Coverity CID: 1250795
* Print human-readable error for "route not found" case.melifaro2014-10-311-2/+11
| | | | | | Submitted by: vsevolod (initial version) MFC after: 2 weeks Sponsored by: Yandex LLC
* Build mount_nfs(8) with WARNS=6.trasz2014-10-312-50/+59
| | | | | | Reviewed by: rmacklem@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Make UEFI booting of 4Kn disks work:ambrisko2014-10-302-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | - convert boot1.efi to corrrectly calculate the lba for what the media reports and convert the size based on what FreeBSD uses. The existing code would use the 512 byte lba and convert the size using 4K byte size. - make fsck_msdosfs read the boot block as 4K so the read doesn't fail on a 4Kn drive since FreeBSD will error out parition reads of a block. Make the bpbBytesPerSec check a multiple of 512 since it can be 512 or 4K depending on the disk. This allows fsck to pass checking the EFI partition on a 4Kn disk. To create the EFI file system I used: newfs_msdos -F 32 -S 4096 -c 1 -m 0xf8 <partition> This works for booting 512 and 4Kn disks. Caveat is that loader.efi cannot read the 4Kn EFI partition. This isn't critical right now since boot1.efi will read loader.efi from the ufs partition. It looks like loader.efi can be fixed via making some of the 512 bytes reads more flexible. loader.efi doesn't have trouble reading the ufs partition. This is probably a simple fix. I now have FreeBSD installed on a system with 4Kn drives and tested the same code works on 512. MFC after: 1 week
* Remove two functions unused after r273848. Would be nice if clangtrasz2014-10-301-29/+0
| | | | | | | or at least scan-build yelled about it. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Note that the "timeout" nfs option is in tenths of a second.trasz2014-10-301-1/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Add support for "timeo", "actimeo", "noac", and "proto" optionstrasz2014-10-302-1/+46
| | | | | | | | | to mount_nfs(8). They are implemented on Linux, OS X, and Solaris, and thus can be expected to appear in automounter maps. Reviewed by: rmacklem@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Get rid of obsolete code in mount_nfs(8).trasz2014-10-301-217/+2
| | | | | Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation
* Fix documentation issue.melifaro2014-10-241-2/+2
| | | | | PR: 194581 Submitted by: madpilot
* Fix displaying non-contiguous netmasks.melifaro2014-10-241-3/+4
| | | | | Found by: ae Sponsored by: Yandex LLC
* Show SFP+/QSFP memory map dump on higher verbose levels.melifaro2014-10-231-2/+44
| | | | | Sponsored by: Yandex LLC MFC after: 1 week
* Add vxlan interfacebryanv2014-10-203-1/+721
| | | | | | | | | | | | | | | | | | | | | vxlan creates a virtual LAN by encapsulating the inner Ethernet frame in a UDP packet. This implementation is based on RFC7348. Currently, the IPv6 support is not fully compliant with the specification: we should be able to receive UPDv6 packets with a zero checksum, but we need to support RFC6935 first. Patches for this should come soon. Encapsulation protocols such as vxlan emphasize the need for the FreeBSD network stack to support batching, GRO, and GSO. Each frame has to make two trips through the network stack, and each frame will be at most MTU sized. Performance suffers accordingly. Some latest generation NICs have begun to support vxlan HW offloads that we should also take advantage of. VIMAGE support should also be added soon. Differential Revision: https://reviews.freebsd.org/D384 Reviewed by: gnn Relnotes: yes
* WARNS=3 and style fixes. No functionality change.hrs2014-10-204-147/+147
|
* * Zero rule buffer.melifaro2014-10-181-6/+7
| | | | | | * Rename 'read' variable. Pointed by: luigi
* * Fix table sets handling.melifaro2014-10-172-3/+4
| | | | | | * Simplify formatting. Suggested by: luigi
* Add -x waittime and -X timeout options for feature parity. These arehrs2014-10-172-9/+63
| | | | | equivalent to -W and -t options of ping(8). Different letters are used because both have already been used for another purposes in ping6(8).
* Show error when deleting non-existing rule number.melifaro2014-10-131-2/+9
| | | | Found by: Oleg Ginzburg
* * Fix zeroing individual entries via ipfw(8).melifaro2014-10-131-1/+11
| | | | | | * Report error and return non-zero exit code if zeroing non-matched entries Found by: Oleg Ginzburg
* Mark iscontrol(8) and iscsi_initiator(4) obsolete.trasz2014-10-111-1/+10
| | | | | | | Differential Revision: https://reviews.freebsd.org/D931 Reviewed by: wblock@ MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Partially fix build on !amd64melifaro2014-10-102-3/+3
| | | | Pointed by: bz
* Do not add late flag when file= is specified because it has a badhrs2014-10-101-8/+1
| | | | | | | side-effect. The specified file should exist before the fstab line. Reported by: wblock (long time ago) MFC after: 1 day
* Sync to HEAD@r272825.melifaro2014-10-091-3/+13
|\
| * Revert r156046. We support setting dumpdev via loader tunable again.ae2014-10-081-3/+13
| | | | | | | | | | | | Also change default disk name to ada. MFC after: 3 weeks
* | * Fix use-after-free in table printing code.melifaro2014-10-091-5/+6
| | | | | | | | * Fix showing human-readable error in table cmds code.
* | Sync to HEAD@r272609.melifaro2014-10-062-16/+30
|\ \ | |/
| * Improve "reserved keywords" hack:melifaro2014-10-061-4/+25
| | | | | | | | | | | | | | | | | | | | | | we can't easily predict (in current parsing model) if the keyword is ipfw(8) reserved keyword or port name. Checking proto database via getprotobyname() consumes a lot of CPU and leads to tens of seconds for parsing large ruleset. Use list of reserved keywords and check them as pre-requisite before doing getprotobyname(). Obtained from: Yandex LLC
| * Use printb() for boolean flags in ro_opts and actor_state for LACP.hrs2014-10-051-12/+5
| |
* | Fix tracked interface list retrieval.melifaro2014-10-051-1/+1
| |
* | Fix GCC wardnings.melifaro2014-10-042-4/+5
| |
* | Sync to HEAD@r272516.melifaro2014-10-0418-381/+555
|\ \ | |/
| * Revert r272390.hrs2014-10-021-1/+1
| | | | | | | | Pointed out by: glebius
| * Separate option handling from SIOC[SG]LAGG to SIOC[SG]LAGGOPTS forhrs2014-10-021-22/+27
| | | | | | | | backward compatibility with old ifconfig(8).
| * Add IFCAP_HWSTATS.hrs2014-10-021-1/+1
| |
| * Virtualize lagg(4) cloner. This change fixes a panic when tearing downhrs2014-10-012-10/+115
| | | | | | | | | | | | | | | | | | | | | | if_lagg(4) interfaces which were cloned in a vnet jail. Sysctl nodes which are dynamically generated for each cloned interface (net.link.lagg.N.*) have been removed, and use_flowid and flowid_shift ifconfig(8) parameters have been added instead. Flags and per-interface statistics counters are displayed in "ifconfig -v". CR: D842
| * Merged from r183296.nyan2014-09-281-2/+2
| | | | | | | | Add missing library dependencies.
| * Refactor the code a little bit to reduce duplicated code.delphij2014-09-261-102/+87
| | | | | | | | | | Reviewed by: mjg MFC after: 2 weeks
| * Explicitly set errno to 0 before calling strto*.delphij2014-09-251-0/+3
| | | | | | | | | | Suggested by: mjg MFC after: 2 weeks
| * The strtol(3) family of functions would set errno when it hits one.delphij2014-09-251-8/+16
| | | | | | | | | | | | | | | | Check errno and handle it as invalid input. Obtained from: HardenedBSD Submitted by: David CARLIER <devnexen@gmail.com> MFC after: 2 weeks
| * Constify a parameter of name2oid. No functional change.delphij2014-09-231-2/+2
| | | | | | | | MFC after: 2 months
| * Fix a typo.hrs2014-09-211-1/+1
| |
| * Fix a bug which could make routed(8) daemon exit by sending a special RIPhrs2014-09-215-7/+35
| | | | | | | | | | | | query from a remote machine, and disable accepting it by default. This requests a routed(8) daemon to dump routing information base for debugging purpose. An -i flag to enable it has been added.
| * Fix a problem that reply packets are not received when -i T option is sethrs2014-09-202-232/+166
| | | | | | | | | | | | | | | | | | | | | | | | and (T < RTT). - Use select(2) for timeout instead of interval timer. Remove poll(2) support. - Use sigaction(2) instead of signal(3). - Exit in SIGINT handler when two signals are received and doing reverse DNS lookup as ping(8) does. - Remove redundant variables used for getaddrinfo(3). PR: 151023
| * Revert changes in r269180. It could cause -c N option to enter anhrs2014-09-201-8/+2
| | | | | | | | | | | | infinite loop if no reply packet is received. PR: 151023
| * The lagg(4) interface is based on trunk(4) interface from OpenBSD.araujo2014-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD is the only system that has the FEC protocol, that is a simple alias to loadbalance protocol and does not implement the ancient Cisco FEC standard. From now on, we remove the fec protocol from the documentation and keep the FEC code only for compatibility. Phabric: D539 Reviewed by: glebius, thompsa Approved by: glebius Sponsored by: QNAP Systems Inc.
| * Add laggproto broadcast, it allows sends frames to all ports of the lagg(4) ↵araujo2014-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | group and receives frames on any port of the lagg(4). Phabric: D549 Reviewed by: glebius, thompsa Approved by: glebius Obtained from: OpenBSD Sponsored by: QNAP Systems Inc.
OpenPOWER on IntegriCloud