Bug 190880 - netif(8): [patch] netif no longer configures aliases for 802.1q interfaces
Summary: netif(8): [patch] netif no longer configures aliases for 802.1q interfaces
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 9.3-BETA2
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-10 14:48 UTC by Dmitry Afanasiev
Modified: 2021-12-16 21:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.