summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
Commit message (Collapse)AuthorAgeFilesLines
...
* Grab one of the ifcap bits for netmap, and enable printing in ifconfig.luigi2011-06-141-1/+1
| | | | | | | Document the fact that we might want an IFCAP_CANTCHANGE mask, even though the value is not yet used in sys/net/if.c (asked on -current a week ago, no feedback so i assume no objection).
* - Accept Router Advertisement messages even when net.inet6.ip6.forwarding=1.hrs2011-06-062-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A new per-interface knob IFF_ND6_NO_RADR and sysctl IPV6CTL_NO_RADR. This controls if accepting a route in an RA message as the default route. The default value for each interface can be set by net.inet6.ip6.no_radr. The system wide default value is 0. - A new sysctl: net.inet6.ip6.norbit_raif. This controls if setting R-bit in NA on RA accepting interfaces. The default is 0 (R-bit is set based on net.inet6.ip6.forwarding). Background: IPv6 host/router model suggests a router sends an RA and a host accepts it for router discovery. Because of that, KAME implementation does not allow accepting RAs when net.inet6.ip6.forwarding=1. Accepting RAs on a router can make the routing table confused since it can change the default router unintentionally. However, in practice there are cases where we cannot distinguish a host from a router clearly. For example, a customer edge router often works as a host against the ISP, and as a router against the LAN at the same time. Another example is a complex network configurations like an L2TP tunnel for IPv6 connection to Internet over an Ethernet link with another native IPv6 subnet. In this case, the physical interface for the native IPv6 subnet works as a host, and the pseudo-interface for L2TP works as the default IP forwarding route. Problem: Disabling processing RA messages when net.inet6.ip6.forwarding=1 and accepting them when net.inet6.ip6.forward=0 cause the following practical issues: - A router cannot perform SLAAC. It becomes a problem if a box has multiple interfaces and you want to use SLAAC on some of them, for example. A customer edge router for IPv6 Internet access service using an IPv6-over-IPv6 tunnel sometimes needs SLAAC on the physical interface for administration purpose; updating firmware and so on (link-local addresses can be used there, but GUAs by SLAAC are often used for scalability). - When a host has multiple IPv6 interfaces and it receives multiple RAs on them, controlling the default route is difficult. Router preferences defined in RFC 4191 works only when the routers on the links are under your control. Details of Implementation Changes: Router Advertisement messages will be accepted even when net.inet6.ip6.forwarding=1. More precisely, the conditions are as follow: (ACCEPT_RTADV && !NO_RADR && !ip6.forwarding) => Normal RA processing on that interface. (as IPv6 host) (ACCEPT_RTADV && (NO_RADR || ip6.forwarding)) => Accept RA but add the router to the defroute list with rtlifetime=0 unconditionally. This effectively prevents from setting the received router address as the box's default route. (!ACCEPT_RTADV) => No RA processing on that interface. ACCEPT_RTADV and NO_RADR are per-interface knob. In short, all interface are classified as "RA-accepting" or not. An RA-accepting interface always processes RA messages regardless of ip6.forwarding. The difference caused by NO_RADR or ip6.forwarding is whether the RA source address is considered as the default router or not. R-bit in NA on the RA accepting interfaces is set based on net.inet6.ip6.forwarding. While RFC 6204 W-1 rule (for CPE case) suggests a router should disable the R-bit completely even when the box has net.inet6.ip6.forwarding=1, I believe there is no technical reason with doing so. This behavior can be set by a new sysctl net.inet6.ip6.norbit_raif (the default is 0). Usage: # ifconfig fxp0 inet6 accept_rtadv => accept RA on fxp0 # ifconfig fxp0 inet6 accept_rtadv no_radr => accept RA on fxp0 but ignore default route information in it. # sysctl net.inet6.ip6.norbit_no_radr=1 => R-bit in NAs on RA accepting interfaces will always be set to 0.
* Add the "nd6 options" line handler as af_other_status() of AF_INET6, not as anhrs2011-06-052-69/+5
| | | | | | own address family. Reviewed by: bz
* Conditionally compile in the af_inet and af_inet6, af_nd6 modules.bz2011-05-316-6/+52
| | | | | | | | | | | | | | | | | | | | | If compiled in for dual-stack use, test with feature_present(3) to see if we should register the IPv4/IPv6 address family related options. In case there is no "inet" support we would love to go with the usage() and make the address family mandatory (as it is for anything but inet in theory). Unfortunately people are used to ifconfig IF up/down etc. as well, so use a fallback of "link". Adjust the man page to reflect these minor details. Improve error handling printing a warning in addition to the usage telling that we do not know the given address family in two places. Reviewed by: hrs, rwatson Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks
* When setting media always and not just in case of switching to IFM_AUTOmarius2011-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
* Revert r220907 and r220915.adrian2011-04-221-5/+3
| | | | | Changing the size of struct ieee80211_mimo_info changes the STA info data, breaking ifconfig in general.
* Change the MIMO userland export ABI to include flags, number of radio chains,adrian2011-04-211-3/+5
| | | | | | extended EVM statistics and EXT channel data. ifconfig still displays 3 chains worth of ctl noise/rssi.
* Correct 'list scan' description in the examples. The previous descriptiongjb2011-04-061-1/+1
| | | | | | | | | was incorrect - 'list scan' does not actually do a scan, but instead lists the results of the background 'scan' cache. Submitted by: Fabian Keil (freebsd-listen of fabiankeil de) (via email) Discussed with: bschmidt MFC after: 3 days
* Bump date from previous commit.gjb2011-03-211-1/+1
|
* Use 'list scan' in favor of 'scan', as 'scan' has a different purpose.gjb2011-03-201-1/+1
| | | | | Pointed out by: bschmidt MFC after: 1 day
* Remove unneeded newline.gjb2011-03-121-1/+0
| | | | MFC after: 1 week
* Add example of using 'scan' for wireless networks, similarly togjb2011-03-121-0/+4
| | | | | | | | OpenBSD's ifconfig(8). PR: 151952 Submitted by: Jared (rhyous of yahoo com) MFC after: 1 week
* Fix the 'scan hang' issue.bschmidt2011-01-301-2/+6
| | | | | | | | | | | | When requesting a scan and one is already in progess, e.g. while in scan state, we happily wait for a scan done notification. Though, this notification might never be sent, e.g. if we are trying to find a network to associate to and there is none. Instead of always waiting for a notification just do so if a new scan has been started. For both cases the scan cache is used to report available networks even if the content might not be fresh. MFC after: 1 month
* When doing a scan while being associated it is possible that the scanbschmidt2011-01-301-0/+1
| | | | | | | | | | | | is deferred for the time it takes to flush the TX queue. This work being done the scan then is continued, but only if it is marked to do so. As the 'ifconfig scan' request is meant to be used after the interface is brought up, request a background scan by default. This behaviour is already documented in manual page. This fixes on possible case where 'ifconfig scan' hangs infinitely. MFC after: 1 month
* Teach ifconfig(8) the handy shared option shortcut aliases the NetBSDmarius2011-01-051-1/+9
| | | | | | | | counterpart also takes, i.e. "fdx" for "full-duplex", "flow" for "flowcontrol", "hdx" for "half-duplex" as well as "loop" and "loopback" for "hw-loopback". MFC after: 1 week
* Remove the advertising clause from UCB copyrighted files in sbin. Thisjoel2010-12-121-4/+0
| | | | | is in accordance with the information at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
* Introduces IFF_CANTCONFIG interface flag to point that the interfaceweongyo2010-12-071-2/+2
| | | | | | | | | isn't configurable in a meaningful way. This is for ifconfig(8) or other tools not to change code whenever IFT_USB-like interfaces are registered at the interface list. Reviewed by: brooks No objections: gavin, jkim
* Don't print usbus[0-9] interfaces that it's not the interestingweongyo2010-12-011-0/+2
| | | | interface type for ifconfig(8).
* When setting a media with no sub-type specified also reset the typemarius2010-11-131-1/+1
| | | | | | | specific options along with the global ones so these options don't stick when f.e. switching to IFM_AUTO. MFC after: 2 weeks
* When printing media with more than one media option set aggregate thesemarius2010-11-131-2/+5
| | | | | | | | in a comma delimited list instead of repeating "mediaopt" for each one. This matches how the options of the active media are printed with print_media_word() and brings us in line what NetBSD does. MFC after: 2 weeks
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-5/+5
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Ethernet vlan(4) interfaces have valid Ethernet link layer addresses butjhb2010-08-062-2/+6
| | | | | | | | use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN interfaces like IFT_ETHER interfaces when handling link layer addresses. Reviewed by: syrinx (bsnmpd) MFC after: 1 week
* Fix typos and spelling mistakes.joel2010-08-061-2/+2
|
* Spelling fixes.joel2010-07-311-4/+4
|
* Document the 'short preamble' capability for 802.11bg.bz2010-05-141-1/+9
| | | | | Reviewed by: sam MFC after: 4 days
* Bump man page date.rpaulo2010-04-281-1/+1
|
* Fix typos.rpaulo2010-04-282-3/+3
| | | | Obtained from: DragonFlyBSD
* When an underlying ioctl(2) handler returns an error, our ioctl(2)delphij2010-04-141-11/+12
| | | | | | | | | | | | | | | | | interface considers that it hits a fatal error, and will not copyout the request structure back for _IOW and _IOWR ioctls, keeping them untouched. The previous implementation of the SIOCGIFDESCR ioctl intends to feed the buffer length back to userland. However, if we return an error, the feedback would be defeated and ifconfig(8) would trap into an infinite loop. This commit changes SIOCGIFDESCR to set buffer field to NULL to indicate the previous ENAMETOOLONG case. Reported by: bschmidt MFC after: 2 weeks
* Add a missing LINE_BREAK() after printing the roaming parameters inrpaulo2010-03-231-0/+1
| | | | | | | verbose mode. Sponsored by: iXsystems, inc. MFC after: 2 weeks
* Verify interface up status using its link state onlyqingli2010-03-161-1/+1
| | | | | | | | | | | | | | if the interface has such capability. The interface capability flag indicates whether such capability exists. This approach is much more backward compatible. Physical device driver changes will be part of another commit. Also updated the ifconfig utility to show the LINKSTATE capability if present. Reviewed by: rwatson, imp, juli MFC after: 3 days
* Fixed dependencies (make checkdpadd).ru2010-02-251-1/+1
|
* Add TSO support on VLAN in fconfig(8).yongari2010-02-203-8/+10
| | | | Reviewed by: thompsa
* The NetBSD Foundation has granted permission for people to removeimp2010-02-161-7/+0
| | | | clause 3 and 4 from their software.
* Shortening a passphrase caused wrong authentication key to be used.ru2010-02-041-0/+1
| | | | | | Fix this in a FreeBSD and OpenBSD compatible way. MFC after: 3 days
* Revised revision 199201 (add interface description capability as inspireddelphij2010-01-272-2/+70
| | | | | | | | by OpenBSD), based on comments from many, including rwatson, jhb, brooks and others. Sponsored by: iXsystems, Inc. MFC after: 1 month
* Raise WARNS for various tools where possible.ed2010-01-171-1/+1
| | | | Submitted by: Marius NĂ¼nnerich <marius@nuenneri.ch>
* Reject invalid CIDR widths rather than silently stopping at the firstemaste2010-01-141-4/+8
| | | | | | | | | | | | non-digit character. Due to an issue with rc(8) in a test configuration, ifconfig was being invoked with the address used again as the width - for example, ifconfig vlan0 10.0.0.1/10.0.0.1 Prior to this change, that address/width would be interpreted as 10.0.0.1/10.
* Spell "Hz" correctly wherever it is user-visible.gavin2010-01-121-5/+5
| | | | | | | PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Approved by: ed (mentor) MFC after: 2 weeks
* ifconfig(8) is documented to take a ISO 3166-1 country code to set thegavin2009-12-151-2/+5
| | | | | | | | | | | | | | | | | regulatory domain with the "country" parameter, but will also take a full country name. The man page warns that only the ISO code is unambiguous. In reality, however, the first match on either would be accepted, leading to "DE" being interpreted as the "DEBUG" country rather than Germany, and "MO" selecting Morocco rather than the correct country, Macau. Fix this by always checking for an ISO CC match first, and only search on the full country name if that fails. PR: bin/140571 Tested by: Dirk Meyer dirk.meyer dinoex.sub.org Reviewed by: sam Approved by: ed (mentor) MFC after: 1 month
* Make ``ifconfig -l ether'' only list interfaces that speak Ethernet.will2009-11-251-3/+19
| | | | | PR: 118987 Approved by: ken (mentor)
* Revert revision 199201 for now as it has introduced a kernel vulnerabilitydelphij2009-11-122-64/+1
| | | | and requires more polishing.
* Add interface description capability as inspired by OpenBSD.delphij2009-11-112-1/+64
| | | | MFC after: 3 months
* Use printb() to display the "nd6 options=" line.hrs2009-10-121-29/+7
|
* Update for latest 802.11s changes in meshconf format.rpaulo2009-10-121-15/+21
| | | | MFC after: 3 days
* Fix several logic bugs in the previous IPv6 variable change andhrs2009-09-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | re-add $ipv6_enable support for backward compatibility. From UPDATING: 1. To use IPv6, simply define $ifconfig_IF_ipv6 like $ifconfig_IF for IPv4. For aliases, $ifconfig_IF_aliasN should be used. Note that both variables need the "inet6" keyword at the head. Do not set $ipv6_network_interfaces manually if you do not understand what you are doing. It is not needed in most cases. $ipv6_ifconfig_IF and $ipv6_ifconfig_IF_aliasN still work, but they are obsolete. 2. $ipv6_enable is obsolete. Use $ipv6_prefer and/or "inet6 accept_rtadv" keyword in ifconfig(8) instead. If you define $ipv6_enable=YES, it means $ipv6_prefer=YES and all configured interfaces have "inet6 accept_rtadv" in the $ifconfig_IF_ipv6. These are for backward compatibility. 3. A new variable $ipv6_prefer has been added. If NO, IPv6 functionality of interfaces with no corresponding $ifconfig_IF_ipv6 is disabled by using "inet6 ifdisabled" flag, and the default address selection policy of ip6addrctl(8) is the IPv4-preferred one (see rc.d/ip6addrctl for more details). Note that if you want to configure IPv6 functionality on the disabled interfaces after boot, first you need to clear the flag by using ifconfig(8) like: ifconfig em0 inet6 -ifdisabled If YES, the default address selection policy is set as IPv6-preferred. The default value of $ipv6_prefer is NO. 4. If your system need to receive Router Advertisement messages, define "inet6 accept_rtadv" in $ifconfig_IF_ipv6. The rc(8) scripts automatically invoke rtsol(8) when the interface becomes UP. The Router Advertisement messages are used for SLAAC (State-Less Address AutoConfiguration).
* Document accept_rev_ethip_ver and send_rev_ethip_ver flags ofhrs2009-09-121-0/+19
| | | | | | EtherIP (gif(4) + if_bridge(8)). MFC after: 3 days
* Improve flexibility of receiving Router Advertisement andhrs2009-09-124-9/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | automatic link-local address configuration: - Convert a sysctl net.inet6.ip6.accept_rtadv to one for the default value of a per-IF flag ND6_IFF_ACCEPT_RTADV, not a global knob. The default value of the sysctl is 0. - Add a new per-IF flag ND6_IFF_AUTO_LINKLOCAL and convert a sysctl net.inet6.ip6.auto_linklocal to one for its default value. The default value of the sysctl is 1. - Make ND6_IFF_IFDISABLED more robust. It can be used to disable IPv6 functionality of an interface now. - Receiving RA is allowed if ip6_forwarding==0 *and* ND6_IFF_ACCEPT_RTADV is set on that interface. The former condition will be revisited later to support a "host + router" box like IPv6 CPE router. The current behavior is compatible with the older releases of FreeBSD. - The ifconfig(8) now supports these ND6 flags as well as "nud", "prefer_source", and "disabled" in ndp(8). The ndp(8) now supports "auto_linklocal". Discussed with: bz and jinmei Reviewed by: bz MFC after: 3 days
* Use printb() instead of rolling its own routine to displayhrs2009-09-071-20/+4
| | | | | | | bits in options=<>. Pointed out by: ume MFC after: 3 days
* Suppress an options line when no bit is on.ume2009-09-071-0/+2
| | | | | Reviewed by: hrs MFC after: 3 days
* Mesh fixes, namely:rpaulo2009-07-271-11/+14
| | | | | | | | | | | | * don't clobber proxy entries * HWMP seq number processing, including discard of old frames * flush routing table entries based on nexthop * print route flags in ifconfig * more debugging messages and comments Proxy changes submitted by sam. Approved by: re (kib)
OpenPOWER on IntegriCloud