summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
Commit message (Collapse)AuthorAgeFilesLines
* MFC r318160, 318176: Persistently store NIC's hardware MAC address, and addrpokala2017-05-181-0/+36
| | | | | | | | | | | | | | | | | | | | | a way to retrive it NOTE: Due to restructuring, the merges didn't apply cleanly; the resulting change is almost identical to what went into stable/11, but in some cases in different locations. The MAC address reported by `ifconfig ${nic} ether' does not always match the address in the hardware, as reported by the driver during attach. In particular, NICs which are components of a lagg(4) interface all report the same MAC. When attaching, the NIC driver passes the MAC address it read from the hardware as an argument to ether_ifattach(). Keep a second copy of it, and create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along with the active MAC address. PR: 194386 (cherry picked from commit 2ce46e31d62424593e08c3853efe8c1e9283aba2)
* Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-251-4/+44
|\
| * MFC r292831: Add SFF-8024 Extended Specification Compliance.melifaro2016-01-171-4/+44
| | | | | | | | | | Submitted by: markb_mellanox.com Differential Revision: https://reviews.freebsd.org/D4666
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-131-9/+6
|\ \ | |/
| * MFC: r287842allanjude2016-01-121-9/+6
| | | | | | | | | | | | Make ifconfig always exit with an error code if an important ioctl fails PR: 203062
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-161-1/+16
|\ \ | |/
| * MFC r290450:smh2015-11-131-1/+16
| | | | | | | | | | | | Add sysctl to control LACP strict compliance default Sponsored by: Multiplay
* | Merge branch 'stable/10' into develRenato Botelho2015-11-0316-63/+25
|\ \ | |/
| * MFC r288305:ngie2015-10-2616-63/+25
| | | | | | | | Replace N #defines with nitems to simplify ifconfig code slightly
* | Merge branch 'stable/10' into develRenato Botelho2015-09-223-21/+130
|\ \ | |/
| * 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.
* | Importing pfSense patch set_ifaddr_first.diffRenato Botelho2015-08-171-0/+18
| |
* | Importing pfSense patch stf_6rd.diffRenato Botelho2015-08-172-0/+158
| |
* | Importing pfSense patch pf_802.1p.diffRenato Botelho2015-08-171-6/+31
| |
* | Importing pfSense patch if_pfsync.diffRenato Botelho2015-08-171-1/+2
|/
* 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)
OpenPOWER on IntegriCloud