HardenedBSD/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
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
af_link.c
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
ifclone.c
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
ifgif.c
ifgre.c
ifgroup.c
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
ifmedia.c
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
regdomain.h