summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
Commit message (Collapse)AuthorAgeFilesLines
* MFC r290450:smh2015-11-131-1/+16
| | | | | | Add sysctl to control LACP strict compliance default Sponsored by: Multiplay
* MFC r288305:ngie2015-10-2616-63/+25
| | | | Replace N #defines with nitems to simplify ifconfig code slightly
* Re-add deprecated options as no-op to prevent breakage of backwardhrs2015-09-211-0/+6
| | | | | | compatibility. Spotted by: ume
* MFC r286700hiren2015-09-152-0/+8
| | | | Make LAG LACP fast timeout tunable through IOCTL.
* MFC 287607:hrs2015-09-131-10/+3
| | | | | - Remove GIF_{SEND,ACCEPT}_REVETHIP. - Simplify EADDRNOTAVAIL and EAFNOSUPPORT conditions.
* MFC 272159,272161,272386,272446,272547,272548,273210:hrs2015-09-122-11/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make lagg protos a enum. - When reconfiguring protocol on a lagg, first set it to LAGG_PROTO_NONE, then drop lock, run the attach routines, and then set it to specific proto. This removes tons of WITNESS warnings. - Make lagg protocol attach handlers not failing and allocate memory with M_WAITOK. - 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". - Separate option handling from SIOC[SG]LAGG to SIOC[SG]LAGGOPTS for backward compatibility with old ifconfig(8). - Move L2 addr configuration for the primary port to a taskqueue. This fixes LOR of softc rmlock in iflladdr_event handlers. - Call if_delmulti_ifma() after LACP_UNLOCK(). This fixes another LOR. - Fix a panic in lacp_transit_expire(). - Fix a panic in lagg_input() upon shutting down a port. - Use printb() for boolean flags in ro_opts and actor_state for LACP. - Fix lladdr configuration which could prevent LACP mode from working. - Fix LORs when a laggport interface has an IPv6 LLA.
* MFC r270064,r270068,r270069,r270115,r270129,r270287,r270822,r271014,melifaro2015-08-154-0/+891
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r271524,r273541,r282967,r283009,r283364. Add support for reading i2c SFP/SFP+ data from NIC driver and presenting most interesting fields via ifconfig -v. This version supports Intel ixgbe driver only. Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers * Add new net/sff8436.h containing constants used to access QSFP+ data via i2c inteface. These constants has been taken from SFF-8436 "QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER" standard rev 4.8. * Add support for printing QSFP+ information from 40G NICs such as Chelsio T5. Example: cxl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,.....> ether 00:07:43:28:ad:08 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet 40Gbase-LR4 <full-duplex> status: active plugged: QSFP+ 40GBASE-LR4 (MPO Parallel Optic) vendor: OEM PN: OP-QSFP-40G-LR4 SN: 20140318001 DATE: 2014-03-18 module temperature: 64.06 C voltage: 3.26 Volts lane 1: RX: 0.47 mW (-3.21 dBm) TX: 2.78 mW (4.46 dBm) lane 2: RX: 0.20 mW (-6.94 dBm) TX: 2.80 mW (4.47 dBm) lane 3: RX: 0.18 mW (-7.38 dBm) TX: 2.79 mW (4.47 dBm) lane 4: RX: 0.90 mW (-0.45 dBm) TX: 2.80 mW (4.48 dBm) Tested on: Chelsio T5 Tested on: Mellanox/Huawei passive/active cables/transceivers. Sponsored by: Yandex LLC
* MFC r282805:hrs2015-07-232-12/+1
| | | | | | | | | | - Remove ND6_IFF_IGNORELOOP. This functionality was useless in practice because a link where looped back NS messages are permanently observed does not work with either NDP or ARP for IPv4. - draft-ietf-6man-enhanced-dad is now RFC 7527. Approved by: re (gjb)
* MFC r273331, r273371, r275851:bryanv2015-06-143-0/+720
| | | | | | | | | - Add vxlan interface - Use the size of the Ethernet address, not the entire header, when copying into forwarding entry. - Prefix all the vxlan ifconfig commands so they are unique
* MFC r271603:bryanv2015-06-131-0/+1
| | | | Add DEF_CLONE_CMD_ARG2
* MFC r282809:ae2015-06-062-8/+36
| | | | | | | | | Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated packets on tunnel interfaces. Add support of these ioctls to gre(4), gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use if_fib value from ifnet structure, use proper value in gre(4) and me(4). Differential Revision: https://reviews.freebsd.org/D2462
* MFC r274246:ae2015-06-061-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul if_gre(4). 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 MFC r274289 (by bz): gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. MFC r274964: Add ip_gre.h to ObsoleteFiles.inc.
* MFC r282965:ae2015-05-312-2/+12
| | | | | | | | | | Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Sponsored by: Yandex LLC
* MFC r281236 -- extended media types in if_media.h.erj2015-05-291-6/+26
| | | | Approved by: jfv (mentor)
* MFC r282747:ngie2015-05-161-3/+1
| | | | | | | | Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) Sponsored by: EMC / Isilon Storage Division
* MFC r261708, r261847, r268525, r274316, r274347, r275593,hiren2015-05-083-2/+21
| | | | | | | | | | | | | | | r276844, r276847, r279531, r279559, r279564, r279676 A bunch of IPv6 fixes by melifaro, hrs and ae Major changes: Simplify nd6_output_lle() Add refcounting to DAD and fix races and other errors Implement Enhanced DAD algorithm for IPv6 Suggested by: ae Tested by: Jason Wolfe <j at nitrology.com> Sponsored by: Limelight Networks
* MFC: r266774:allanjude2015-04-161-11/+34
| | | | | | | | | | improve ifconfig(8) man page by describing special behaviour of -l ether MFC: r267141: Style cleanups on ifconfig.8 Approved by: eadler (mentor, implicit) Sponsored by: ScaleEngine Inc.
* MFC 279951:jhb2015-04-091-5/+4
| | | | | | | | Simplify string mangling in ifmaybeload(). - Use strlcpy() instead of strcpy(). - Use strlcat() instead of a strlcpy() with a magic number subtracted from the length. - Replace strncmp(..., strlen(foo) + 1) with strcmp(...).
* MFC r271307:ae2014-10-092-1/+18
| | | | | | | | 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.
* MFC r269888:gjb2014-08-151-1/+1
| | | | | | Fix a typo in a comment: s/interprete/interpret/ Sponsored by: The FreeBSD Foundation
* MFC r268049:ume2014-07-071-9/+13
| | | | | | | | Fix ifconfig to show pltime and vltime with -L option, again after usage change from time_second to time_uptime. PR: 188520 Submitted by: Guy Yur <guyyur__at__gmail.com>
* Bulk sync of pf changes from head, in attempt to fixup broken build Iglebius2014-03-121-0/+2
| | | | | | | | | made in r263029. Merge r257186,257215,257349,259736,261797. These changesets split pfvar.h into several smaller headers and make userland utilities to include only some of them.
* MFH (r256768): don't report an error for no-op add / removedes2014-02-271-2/+2
|
* Merge r256824 from head:glebius2013-10-291-2/+2
| | | | | | | | | | | | | | | | Provide a working example line for an interface with 1 address running with CARP. Currently, we've got a problem that interface isn't IFF_UP at the time we assign it a redundant address, and the latter gets stuck in INIT state. Additional SIOCSIFFLAGS from ifconfig(8) kicks it to a working state. A proper fix is kernel side and appeared to be non-trivial, not to be checked in before 10.0-RELEASE. Submitted by: Ole Myhre <ole.myhre dataoppdrag.no> Approved by: re (kib)
* Fix a typo (s/error/errno/).hrs2013-07-031-1/+1
|
* Do not display a warning message in a jail without AF_INET6 support.hrs2013-06-301-1/+1
| | | | MFC after: 3 days
* mdoc sweepjoel2013-05-131-3/+9
|
* Don't free memory that is going to be used as error string.glebius2013-04-251-3/+1
| | | | | PR: bin/178121 Submitted by: Garrett Cooper <yaneurabeya gmail.com>
* Mark a mesh path to a mesh gate with a 'G'.monthadar2013-02-071-1/+3
| | | | Approved by: adrian (mentor)
* Add no_prefer_iface option.ume2013-01-093-2/+11
| | | | | | | | | | It stops treating the address on the interface as special by source address selection rule even when the interface is outgoing interface. This is desired in some situation. Requested by: hrs Reviewed by: IHANet folks including hrs MFC after: 1 week
* Fix socket calls on error post-r243965.kevlo2012-12-212-2/+2
| | | | Submitted by: Garrett Cooper
* - Fix LOR in sa6_recoverscope() in rt_msg2()[1].hrs2012-12-041-2/+3
| | | | | | | - Check V_deembed_scopeid before checking if sa_family == AF_INET6. - Fix scope id handing in route(8)[2] and ifconfig(8). Reported by: rpaulo[1], Mateusz Guzik[1], peter[2]
* Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel tohrs2012-11-171-41/+2
| | | | | | | | | | | | userland via routing socket or sysctl. This eliminates the following KAME-specific sin6_scope_id handling routine from each userland utility: sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); This behavior can be controlled by net.inet6.ip6.deembed_scopeid. This is set to 1 by default (sin6_scope_id will be filled in the kernel). Reviewed by: bz
* Actually change "silent" to "silence" this time (reviewed by adri@).wblock2012-11-071-1/+1
| | | | MFC after: 1 week
* Remove fifteen-year-old notes on media selection (suggested by simon@).wblock2012-11-071-20/+17
| | | | | | | Add commas after "e.g." and "i.e.". Change "silent" to "silence" in wireless create section (reviewed by adri@). MFC after: 1 week
* Add devd.conf(5) and devd(8) to SEE ALSO xrefs. Give users a pointer towblock2012-11-071-1/+3
| | | | | | | | | seemingly mysterious actions that are not done by ifconfig itself, but by devd triggering on events caused by ifconfig. PR: docs/173405 Submitted by: Mateusz Kwiatkowski <mateusz.kwiatkowski@atlashost.eu> MFC after: 1 week
* Remove "prefer_source" address selection option. FreeBSD has had anhrs2012-07-092-9/+1
| | | | | implementation of RFC 3484 for this purpose for a long time and "prefer_source" was never implemented actually. ND6_IFF_PREFER_SOURCE macro is left intact.
* - Updated TOE support in the kernel.np2012-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs. These are available as t3_tom and t4_tom modules that augment cxgb(4) and cxgbe(4) respectively. The cxgb/cxgbe drivers continue to work as usual with or without these extra features. - iWARP driver for Terminator 3 ASIC (kernel verbs). T4 iWARP in the works and will follow soon. Build-tested with make universe. 30s overview ============ What interfaces support TCP offload? Look for TOE4 and/or TOE6 in the capabilities of an interface: # ifconfig -m | grep TOE Enable/disable TCP offload on an interface (just like any other ifnet capability): # ifconfig cxgbe0 toe # ifconfig cxgbe0 -toe Which connections are offloaded? Look for toe4 and/or toe6 in the output of netstat and sockstat: # netstat -np tcp | grep toe # sockstat -46c | grep toe Reviewed by: bz, gnn Sponsored by: Chelsio communications. MFC after: ~3 months (after 9.1, and after ensuring MFC is feasible)
* Remove repeated words.joel2012-06-051-1/+1
|
* if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a rowrea2012-05-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, 'ifconfig laggX down' does not remove members from this lagg(4) interface. So, 'service netif stop laggX' followed by 'service netif start laggX' will choke, because "stop" will leave interfaces attached to the laggX and ifconfig from the "start" will refuse to add already-existing interfaces. The real-world case is when I am bundling together my Ethernet and WiFi interfaces and using multiple profiles for accessing network in different places: system being booted up with one profile, but later this profile being exchanged to another one, followed by 'service netif restart' will not add WiFi interface back to the lagg: the "stop" action from 'service netif restart' will shut down my main WiFi interface, so wlan0 that exists in the lagg0 will be destroyed and purged from lagg0; the "start" action will try to re-add both interfaces, but since Ethernet one is already in lagg0, ifconfig will refuse to add the wlan0 from WiFi interface. Since adding the interface to the lagg(4) when it is already here should be an idempotent action: we're really not changing anything, so this fix doesn't change the semantics of interface addition. Approved by: thompsa Reviewed by: emaste MFC after: 1 week
* Removed the IFCAP_ prefix when printing the IPv6 checksum capabilities.bz2012-05-281-1/+1
| | | | | Submitted by: dim MFC after: 3 days
* It turns out that too many drivers are not only parsing the L2/3/4bz2012-05-282-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | headers for TSO but also for generic checksum offloading. Ideally we would only have one common function shared amongst all drivers, and perhaps when updating them for IPv6 we should introduce that. Eventually we should provide the meta information along with mbufs to avoid (re-)parsing entirely. To not break IPv6 (checksums and offload) and to be able to MFC the changes without risking to hurt 3rd party drivers, duplicate the v4 framework, as other OSes have done as well. Introduce interface capability flags for TX/RX checksum offload with IPv6, to allow independent toggling (where possible). Add CSUM_*_IPV6 flags for UDP/TCP over IPv6, and reserve further for SCTP, and IPv6 fragmentation. Define CSUM_DELAY_DATA_IPV6 as we do for legacy IP and add an alias for CSUM_DATA_VALID_IPV6. This pretty much brings IPv6 handling in line with IPv4. TSO is still handled in a different way and not via if_hwassist. Update ifconfig to allow (un)setting of the new capability flags. Update loopback to announce the new capabilities and if_hwassist flags. Individual driver updates will have to follow, as will SCTP. Reported by: gallatin, dim, .. Reviewed by: gallatin (glanced at?) MFC after: 3 days X-MFC with: r235961,235959,235958
* MFp4 bz_ipv6_fast:bz2012-05-192-1/+21
| | | | | | | | | | | | Allow tso4 and tso6 be set individually given we have the bits. This will help with drivers not working as expected during the transition time and later. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Reviewed by: gnn MFC After: 1 week
* Skip nd6 line with no warning message when the system does not supporthrs2012-05-111-2/+4
| | | | | | INET6. Spotted by: flo
* Update man page date to the date of the last commit.monthadar2012-05-021-1/+1
| | | | Approved by: adrian
* * Modified ifconfig to show the IEEE80211_MESHRT_FLAGS_DISCOVER flag with a 'D';monthadar2012-05-011-0/+2
| | | | Approved by: adrian
* * Added new command to ifconfig to activate Mesh Gate Announcement calledmonthadar2012-05-012-0/+20
| | | | | | meshgate with corresponding explanation; Approved by: adrian
* Remove end of line whitespace introduced in previous commit.joel2012-04-071-1/+1
|
* Document syncdev, syncpeer and defer keywords forglebius2012-04-031-1/+19
| | | | pfsync(4) interfaces.
* Make it possible to switch pfsync(4) deferral mechanism on/off.glebius2012-04-031-3/+25
| | | | Obtained from: OpenBSD
OpenPOWER on IntegriCloud