Bug 190880

Summary: netif(8): [patch] netif no longer configures aliases for 802.1q interfaces
Product: Base System Reporter: Dmitry Afanasiev <KOT>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: dteske
Priority: ---    
Version: 9.3-BETA2   
Hardware: Any   
OS: Any   

Description Dmitry Afanasiev 2014-06-10 14:48:58 UTC
Changes from r264243 broke configuring aliases for 802.1q interfaces.
In my rc.conf I have:
cloned_interfaces="nfe0.2 nfe0.6 nfe0.19"
ifconfig_nfe0="up"
ifconfig_nfe0_2="inet 192.168.2.2/24"
ifconfig_nfe0_2_alias0="inet 192.168.222.2/24"
ifconfig_nfe0_6="inet 192.168.6.2/24"
ifconfig_nfe0_19="inet 192.168.19.2/30"

After update to 9.3-BETA2 (r267262) I got this message on boot:
ifconfig: interface nfe0_2 does not exist

Root cause is in replacing "." to "_" for $_if in ifalias_af_common() function in network.subr, and passing incorrect $_if to ifconfig command.

To fix a problem I used this patch:
--- network.subr.orig   2014-06-10 14:50:39.516897085 +0400
+++ network.subr        2014-06-10 12:59:44.755780832 +0400
@@ -1095,7 +1095,7 @@
        # Process the last component
        case $_tmpargs in
        ${_af}\ *)
-               ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0
+               ifalias_af_common_handler $1 $_af $_action $_tmpargs && _ret=0
        ;;
        esac


But I'm not sure it is correct. Please verify it.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-06-15 04:49:57 UTC
Notify committer of r264243.