NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/39376: /etc/rc.d/network chokes on network interfaces with dots in their names, such as xvifN.M in Xen

>Number:         39376
>Category:       misc
>Synopsis:       /etc/rc.d/network chokes on network interfaces with dots in 
>their names, such as xvifN.M in Xen
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 18 16:30:00 +0000 2008
>Originator:     Taylor R Campbell <>
>Release:        NetBSD 4.0_STABLE
System: NetBSD smalltalk.localdomain 4.0_STABLE NetBSD 4.0_STABLE 
(RIAXEN3_DOM0) #2: Fri Jul 18 23:32:56 UTC 2008 
Architecture: i386
Machine: i386

        In /etc/rc.d/network, for each network interface `int' to be
        configured, the script checks for a variable `ifconfig_$int'
        for a list of arguments to pass to ifconfig, using
                eval args=\$ifconfig_$int
                if [ -n "$args" ]; then ... fi
        If `int' contains a dot, such as xvifN.M, then whatever the
        value of `ifconfig_xvifN', `args' will have the string `.M'
        appended, since a dot is a delimiter for an environment
        variable in sh.  Either way, `args' is always non-empty, so
        that the script tries to invoke `ifconfig' with a trailing `.M'
        on the last argument, or as the only command if
        `ifconfig_xvifN' was unset.
        This may just as well be considered a Xen bug for using
        interface names with dots in them.  Whatever the problem is, it
        shouldn't cause rc scripts to spit out error messages.


        Set auto_ifconfig=YES in /etc/rc.conf.  In a Xen dom0 with a
        domU running and its Xen virtual interface xvifN.M up, run
        `/etc/rc.d/network restart'.  ifconfig will report an error:
        `.M bad value' (where M is the number of the
        `xvifN.' interface).


        Any solution to this problem would require a policy about the
        names of rc.conf variables for interfaces whose names contain
        dots, or other funny characters.  One simple possibility would
        be to translate all dots into underscores, but then someone
        else might come along and use another funny character and
        require further specal cases.

Home | Main Index | Thread Index | Old Index