freebsd-dev/sbin/ifconfig
Eygene Ryabinkin f74d5a7a20 if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row
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
2012-05-28 12:13:04 +00:00
..
af_atalk.c - Use size_t instead of int when appropriate; 2009-06-23 23:49:52 +00:00
af_inet6.c A major overhaul of the CARP implementation. The ip_carp.c was started 2011-12-16 12:16:56 +00:00
af_inet.c Since size of struct in_aliasreq has just been changed in r228571, 2011-12-16 13:30:17 +00:00
af_ipx.c Remove IPX over IP tunneling pieces from ifconfig(8), omitted portion of 2007-06-13 18:07:59 +00:00
af_link.c Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but 2010-08-06 15:09:21 +00:00
af_nd6.c Skip nd6 line with no warning message when the system does not support 2012-05-11 20:01:45 +00:00
carp.c Rename ifcarp.c to carp.c 2011-12-16 14:30:58 +00:00
ifbridge.c Add an option to limit the number of source MACs that can be behind a bridge 2007-11-04 08:32:27 +00:00
ifclone.c - Use size_t instead of int when appropriate; 2009-06-23 23:49:52 +00:00
ifconfig.8 It turns out that too many drivers are not only parsing the L2/3/4 2012-05-28 09:30:13 +00:00
ifconfig.c Removed the IFCAP_ prefix when printing the IPv6 checksum capabilities. 2012-05-28 10:45:51 +00:00
ifconfig.h A major overhaul of the CARP implementation. The ip_carp.c was started 2011-12-16 12:16:56 +00:00
iffib.c Add infrastructure to allow all frames/packets received on an interface 2011-07-03 12:22:02 +00:00
ifgif.c Use printb() instead of rolling its own routine to display 2009-09-07 15:52:15 +00:00
ifgre.c - Use size_t instead of int when appropriate; 2009-06-23 23:49:52 +00:00
ifgroup.c Default to AF_LOCAL instead of AF_INET sockets for non-family-specific 2009-03-15 22:33:18 +00:00
ifieee80211.c * Modified ifconfig to show the IEEE80211_MESHRT_FLAGS_DISCOVER flag with a 'D'; 2012-05-01 16:17:17 +00:00
iflagg.c if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row 2012-05-28 12:13:04 +00:00
ifmac.c - Use size_t instead of int when appropriate; 2009-06-23 23:49:52 +00:00
ifmedia.c When setting media always and not just in case of switching to IFM_AUTO 2011-05-15 12:51:00 +00:00
ifpfsync.c Make it possible to switch pfsync(4) deferral mechanism on/off. 2012-04-03 18:10:48 +00:00
ifvlan.c Allow toggling of IFCAP_VLAN_HWCSUM for hardware that supports checksum 2011-12-17 15:44:34 +00:00
Makefile Disable jail support in ifconfig when either building a rescue 2012-02-14 07:14:42 +00:00
regdomain.c ifconfig(8) is documented to take a ISO 3166-1 country code to set the 2009-12-15 20:44:12 +00:00
regdomain.h Regulatory fixups: 2009-02-07 01:12:51 +00:00