| Summary: | ifconfig: group parameter makes impossible to restart interface | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | d.y.kazarov | ||||
| Component: | kern | Assignee: | Alan Somers <asomers> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 8.2-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->asomers I'll take it State Changed From-To: open->patched Independently fixed by des in change 256768. The fix is in stable/10 but not yet in stable/9 State Changed From-To: patched->closed MFCed to stable/9 by r263739 |
If group parameter is specified in /etc/rc.conf it makes /etc/rc.d/netif restart to fail: # fgrep re0 /etc/rc.conf ifconfig_re0='192.168.1.20/24 group ifgrp' # ifconfig -v re0 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1f:d0:5e:8f:57 inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active groups: ifgrp # /etc/rc.d/netif restart re0 Stopping Network: re0. re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1f:d0:5e:8f:57 media: Ethernet autoselect (none) status: no carrier ifconfig: SIOCAIFGROUP: File exists Starting Network: re0. re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1f:d0:5e:8f:57 media: Ethernet autoselect (none) status: no carrier The source of problem is that groups parameter persist when interface goes down: # /etc/rc.d/netif stop re0 Stopping Network: re0. re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1f:d0:5e:8f:57 media: Ethernet autoselect (1000baseT <full-duplex>) status: active # ifconfig -v re0 re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3898<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1f:d0:5e:8f:57 media: Ethernet autoselect (1000baseT <full-duplex>) status: active groups: ifgrp IMHO it's better to just ignore error when group param specifies groupname to which interface is already assigned.