Commit Graph

7683 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
5a06ac3540 Add support for "timeo", "actimeo", "noac", and "proto" options
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
2014-10-30 08:50:01 +00:00
Edward Tomasz Napierala
2795d7de01 Get rid of obsolete code in mount_nfs(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2014-10-30 08:05:51 +00:00
Alexander V. Chernikov
ca807c8a88 Fix documentation issue.
PR:		194581
Submitted by:	madpilot
2014-10-24 17:06:56 +00:00
Alexander V. Chernikov
382a5cbf42 Fix displaying non-contiguous netmasks.
Found by:	ae
Sponsored by:	Yandex LLC
2014-10-24 13:29:12 +00:00
Alexander V. Chernikov
34bad16f60 Show SFP+/QSFP memory map dump on higher verbose levels.
Sponsored by:	Yandex LLC
MFC after:	1 week
2014-10-23 11:01:49 +00:00
Bryan Venteicher
007054f070 Add vxlan interface
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
2014-10-20 14:42:42 +00:00
Hiroki Sato
7e9489e0f6 WARNS=3 and style fixes. No functionality change. 2014-10-20 00:27:40 +00:00
Alexander V. Chernikov
6ff33bb6aa * Zero rule buffer.
* Rename 'read' variable.

Pointed by:	luigi
2014-10-18 15:18:31 +00:00
Alexander V. Chernikov
d3de6c1d2f * Fix table sets handling.
* Simplify formatting.

Suggested by:	luigi
2014-10-17 20:47:55 +00:00
Hiroki Sato
b021de9cd7 Add -x waittime and -X timeout options for feature parity. These are
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).
2014-10-17 09:33:09 +00:00
Alexander V. Chernikov
6ca0dd05f4 Show error when deleting non-existing rule number.
Found by:	Oleg Ginzburg
2014-10-13 12:49:04 +00:00
Alexander V. Chernikov
60f485ca9f * Fix zeroing individual entries via ipfw(8).
* Report error and return non-zero exit code if zeroing non-matched entries

Found by:	Oleg Ginzburg
2014-10-13 11:26:17 +00:00
Edward Tomasz Napierala
d32789d95c Mark iscontrol(8) and iscsi_initiator(4) obsolete.
Differential Revision:	https://reviews.freebsd.org/D931
Reviewed by:	wblock@
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-10-11 05:18:22 +00:00
Alexander V. Chernikov
9fe15d0612 Partially fix build on !amd64
Pointed by:	bz
2014-10-10 17:24:56 +00:00
Hiroki Sato
1482f98247 Do not add late flag when file= is specified because it has a bad
side-effect.  The specified file should exist before the fstab line.

Reported by:	wblock (long time ago)
MFC after:	1 day
2014-10-10 03:20:12 +00:00
Alexander V. Chernikov
779b53d008 Sync to HEAD@r272825. 2014-10-09 15:35:28 +00:00
Alexander V. Chernikov
68bde59ebe * Fix use-after-free in table printing code.
* Fix showing human-readable error in table cmds code.
2014-10-09 12:54:56 +00:00
Andrey V. Elsukov
a62c8c6a99 Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after:	3 weeks
2014-10-08 12:19:48 +00:00
Alexander V. Chernikov
a5fedf11fc Sync to HEAD@r272609. 2014-10-06 11:29:50 +00:00
Alexander V. Chernikov
9bb47e7068 Improve "reserved keywords" hack:
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
2014-10-06 11:00:47 +00:00
Alexander V. Chernikov
4deb9c9287 Fix tracked interface list retrieval. 2014-10-05 10:20:47 +00:00
Hiroki Sato
7eb756fab1 Use printb() for boolean flags in ro_opts and actor_state for LACP. 2014-10-05 02:37:01 +00:00
Alexander V. Chernikov
d91c61c364 Fix GCC wardnings. 2014-10-04 17:21:30 +00:00
Alexander V. Chernikov
1ce4b35740 Sync to HEAD@r272516. 2014-10-04 12:42:37 +00:00
Alexander V. Chernikov
5371ab1408 Document new table values.
Sponsored by:	Yandex LLC
2014-10-03 15:36:58 +00:00
Hiroki Sato
4f7bf7a846 Revert r272390.
Pointed out by:	glebius
2014-10-02 20:17:16 +00:00
Hiroki Sato
9732189ca9 Separate option handling from SIOC[SG]LAGG to SIOC[SG]LAGGOPTS for
backward compatibility with old ifconfig(8).
2014-10-02 20:01:13 +00:00
Hiroki Sato
394c813d06 Add IFCAP_HWSTATS. 2014-10-02 00:19:24 +00:00
Hiroki Sato
939a050ad9 Virtualize lagg(4) cloner. This change fixes a panic when tearing down
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
2014-10-01 21:37:32 +00:00
Yoshihiro Takahashi
3754eb026e Merged from r183296.
Add missing library dependencies.
2014-09-28 08:23:26 +00:00
Xin LI
e267e00eef Refactor the code a little bit to reduce duplicated code.
Reviewed by:	mjg
MFC after:	2 weeks
2014-09-26 05:05:34 +00:00
Xin LI
4b8740cd0a Explicitly set errno to 0 before calling strto*.
Suggested by:	mjg
MFC after:	2 weeks
2014-09-25 22:47:19 +00:00
Xin LI
9e4ed37219 The strtol(3) family of functions would set errno when it hits one.
Check errno and handle it as invalid input.

Obtained from:	HardenedBSD
Submitted by:	David CARLIER <devnexen@gmail.com>
MFC after:	2 weeks
2014-09-25 22:37:27 +00:00
Xin LI
c58f8df6e7 Constify a parameter of name2oid. No functional change.
MFC after:	2 months
2014-09-23 22:15:00 +00:00
Hiroki Sato
ebb03f0b57 Fix a typo. 2014-09-21 05:03:04 +00:00
Hiroki Sato
b9f70ced25 Fix a bug which could make routed(8) daemon exit by sending a special RIP
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.
2014-09-21 04:00:28 +00:00
Hiroki Sato
0ecaa7ed05 Fix a problem that reply packets are not received when -i T option is set
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
2014-09-20 19:54:19 +00:00
Hiroki Sato
58da716138 Revert changes in r269180. It could cause -c N option to enter an
infinite loop if no reply packet is received.

PR:	151023
2014-09-20 18:48:50 +00:00
Marcelo Araujo
44a9271b49 The lagg(4) interface is based on trunk(4) interface from OpenBSD.
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.
2014-09-18 02:22:02 +00:00
Marcelo Araujo
99cdd96163 Add laggproto broadcast, it allows sends frames to all ports of the lagg(4) 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.
2014-09-18 02:12:48 +00:00
Bryan Drewery
5e93a4b46b If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix
a FILE* leak in getbounds().

Submitted by:	Conrad Meyer <conrad.meyer@isilon.com>
PR:		192032
Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-09-17 19:09:58 +00:00
Bryan Venteicher
759e01ce9a Add DEF_CLONE_CMD_ARG2
This will be used in the forthcoming vxlan import.

Reviewed by:	gnn
Phabric:	https://reviews.freebsd.org/D382
2014-09-14 22:10:35 +00:00
Alexander Motin
959ec2581b Update CAM CCB accounting for the new status quo.
devq_openings counter lost its meaning after allocation queues has gone.
held counter is still meaningful, but problematic to update due to separate
locking of CCB allocation and queuing.

To fix that replace devq_openings counter with allocated counter.  held is
now calculated on request as difference between number of allocated, queued
and active CCBs.

MFC after:	1 month
2014-09-14 11:59:49 +00:00
Alexander V. Chernikov
b2100781b8 Do not try to read i2c info when no transceiver is present.
MFC with:	r270064
Sponsored by:	Yandex LLC
2014-09-13 16:04:55 +00:00
John Baldwin
7d8312cc92 Add a sysctl to export the EFI memory map along with a handler in the
sysctl(8) binary to format it.

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D771
2014-09-13 03:10:02 +00:00
John Baldwin
59101c5d95 Pass the length of an structure to the pretty-printer backends as a
size_t instead of an int.
2014-09-12 21:01:39 +00:00
Gleb Smirnoff
b249f3c575 Since r270929 raw sockets expect network byte order.
Submitted by:	avg
2014-09-11 05:48:39 +00:00
Hiroki Sato
adbc0311a3 Fix a bug which could break extended attributes in a dump output.
This occurred when a file was >892kB long and had a large data (>1kB)
in the extended attributes.

Reported by:	Masashi Toriumi
Reviewed by:	mckusick
2014-09-10 22:37:20 +00:00
Andrey V. Elsukov
5dbfa43f65 Add the ability to set `prefer_source' flag to an IPv6 address.
It affects the IPv6 source address selection algorithm (RFC 6724)
and allows override the last rule ("longest matching prefix") for
choosing among equivalent addresses. The address with `prefer_source'
will be preferred source address.

Obtained from:	Yandex LLC
MFC after:	1 month
Sponsored by:	Yandex LLC
2014-09-09 10:52:50 +00:00
Alexander V. Chernikov
d6164b77f8 Make ipfw_nat module use IP_FW3 codes.
Kernel changes:
* Split kernel/userland nat structures eliminating IPFW_INTERNAL hack.
* Add IP_FW_NAT44_* codes resemblin old ones.
* Assume that instances can be named (no kernel support currently).
* Use both UH+WLOCK locks for all configuration changes.
* Provide full ABI support for old sockopts.

Userland changes:
* Use IP_FW_NAT44_* codes for nat operations.
* Remove undocumented ability to show ranges of nat "log" entries.
2014-09-07 18:30:29 +00:00