NetBSD Problem Report #39376
From riastradh@smalltalk.localdomain Mon Aug 18 16:28:46 2008
Return-Path: <riastradh@smalltalk.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 3E79563B877
for <gnats-bugs@gnats.NetBSD.org>; Mon, 18 Aug 2008 16:28:46 +0000 (UTC)
Message-Id: <20080818162703.9F72066@smalltalk.localdomain>
Date: Mon, 18 Aug 2008 16:27:03 +0000 (UTC)
From: Taylor R Campbell <campbell@mumble.net>
Reply-To: Taylor R Campbell <campbell@mumble.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: /etc/rc.d/network chokes on network interfaces with dots in their names, such as xvifN.M in Xen
X-Send-Pr-Version: 3.95
>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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 18 16:30:00 +0000 2008
>Closed-Date: Sun May 01 01:50:52 +0000 2011
>Last-Modified: Sun May 01 01:50:52 +0000 2011
>Originator: Taylor R Campbell <campbell@mumble.net>
>Release: NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD smalltalk.localdomain 4.0_STABLE NetBSD 4.0_STABLE (RIAXEN3_DOM0) #2: Fri Jul 18 23:32:56 UTC 2008 riastradh@smalltalk:/home/riastradh/netbsd/4/obj/sys/arch/i386/compile/RIAXEN3_DOM0 i386
Architecture: i386
Machine: i386
>Description:
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.
>How-To-Repeat:
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).
>Fix:
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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: jym@NetBSD.org
State-Changed-When: Thu, 07 Apr 2011 00:00:08 +0000
State-Changed-Why:
xvif(4) has now changed from xvifX.Y to xvifXiY notation.
ifconfig_xxN policy regarding interface names will be more precise in
ifconfig.if(5Â).
From: "Jean-Yves Migeon" <jym@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39376 CVS commit: src
Date: Wed, 6 Apr 2011 23:51:56 +0000
Module Name: src
Committed By: jym
Date: Wed Apr 6 23:51:56 UTC 2011
Modified Files:
src/share/man/man4: xvif.4
src/sys/arch/xen/xen: xennetback_xenbus.c
Log Message:
Alright, set xvif(4) syntax once and for all. Tested with ipf(4) under
XEN3_DOM0 amd64.
Fixes PR misc/39376.
See http://mail-index.netbsd.org/port-xen/2011/04/06/msg006603.html
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/xvif.4
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/xen/xen/xennetback_xenbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Jean-Yves Migeon" <jym@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39376 CVS commit: src/share/man/man5
Date: Thu, 7 Apr 2011 00:22:59 +0000
Module Name: src
Committed By: jym
Date: Thu Apr 7 00:22:59 UTC 2011
Modified Files:
src/share/man/man5: ifconfig.if.5
Log Message:
Be more precise on the chars accepted for xxN in /etc/ifconfig.xxN
filenames, and ifconfig_xxN variables inside rc.conf(5).
Should fix PR misc/39376.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man5/ifconfig.if.5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Taylor R Campbell <campbell+netbsd@mumble.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/39376
Date: Wed, 20 Apr 2011 21:49:43 +0000
Sorry, didn't see that this was in the feedback state until Gnats
reminded me.
Looks good to me. I can't test this easily now because I don't use
Xen any more, but it should be straightforward for anyone who does
have Xen set up to try the test I gave.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 01 May 2011 01:50:52 +0000
State-Changed-Why:
Submitter can't test but I don't think we really need to at this point.
(If someone discovers that it *doesn't* work, let us know.)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.