amd64/136251: xn0 doesn't DHCP

Tim Bishop tim at bishnet.net
Thu Jul 2 16:40:05 UTC 2009


>Number:         136251
>Category:       amd64
>Synopsis:       xn0 doesn't DHCP
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 02 16:40:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Tim Bishop
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD xenserver.kent.ac.uk 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed Jul 1 22:55:53 BST 2009 tdb at xenserver.kent.ac.uk:/usr/obj/usr/src/sys/XENHVM amd64

Running 8.0-CURRENT as of yesterday on Citrix XenServer 5.5.0.
>Description:
When using the amd64 XENHVM kernel (which has the xenpci
device) the machine has a network device called xn0:

xenpci0: <Xen Platform Device> port 0xc000-0xc0ff mem 0xf2000000-0xf2ffffff irq 30 at device 3.0 on pci0
xenbus0: <Xen Devices> on xenpci0
xn0: <Virtual Network Interface> at device/vif/0 on xenbus0
xn0: Ethernet address: 36:ab:02:63:a3:ff

However, this device doesn't behave like a normal network
device, so adding the following to rc.conf doesn't do DHCP:

ifconfig_xn0="DHCP"

After some poking around I realised dhclient was launched
by devd. However, the xn0 device has properties which don't
match the existing rules:

setting system=IFNET
setting subsystem=xn0
setting type=ATTACH
>How-To-Repeat:
See above: 8.0-CURRENT, amd64 XENHVM kernel, Citrix XenServer.
>Fix:
I've worked around this problem by adding the following
entry to /etc/devd.conf at line 77 (after the IFNET/LINK_UP/802.11
section):
        
notify 0 {
        match "system"          "IFNET";
        match "subsystem"       "xn[0-9]+";
        match "type"            "ATTACH";
        action "/etc/rc.d/dhclient quietstart $subsystem";
};
        
This is my first look at devd, so apologies if this fix
isn't appropriate.

It'd be great if this fix could make it in to 8.0.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list