From nobody@FreeBSD.org  Fri Apr 25 12:15:20 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id B8128FD7
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Apr 2014 12:15:20 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 97DE21AA2
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Apr 2014 12:15:20 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PCFKoW002280
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Apr 2014 12:15:20 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3PCFK1v002266;
	Fri, 25 Apr 2014 12:15:20 GMT
	(envelope-from nobody)
Message-Id: <201404251215.s3PCFK1v002266@cgiserv.freebsd.org>
Date: Fri, 25 Apr 2014 12:15:20 GMT
From: Thomas Zelch <thomaszelch@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dhclient does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188990
>Category:       bin
>Synopsis:       [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-xen
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 25 12:20:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Tue Apr 29 21:20:09 UTC 2014
>Originator:     Thomas Zelch
>Release:        10.0-RELEASE-p1
>Organization:
>Environment:
FreeBSD hostname 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #0: Tue Apr  8 06:45:06 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When trying to get a DHCP Lease with the Xen-PV Network Device xn0, DHCP Offers from the DHCP Server are ignored and the following Error Message is shown:

[root@hostname ~]# dhclient xn0
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 14
5 bad udp checksums in 5 packets
DHCPDISCOVER on xn0 to 255.255.255.255 port 67 interval 20
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

When taking a tcpdump while dhclient is running, the DHCP Offers from the DHCP Server are visible, but it seems dhclient is ignoring them, as the udp checksum is bad out of whatever Reason.

As Google search turned up a lot of Bugs in Linux which were caused by UDP Checksum Offload, i have tried disabling all NIC Features both in the FreeBSD Guest and the dom0, without any success.

See tcpdump Output below:

14:07:26.709519 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:16:3e:19:5e:75, length 300, xid 0x738d8779, secs 4, Flags [none] (0x0000)
	  Client-Ethernet-Address 00:16:3e:19:5e:75
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Discover
	    Client-ID Option 61, length 7: ether 00:16:3e:19:5e:75
	    Hostname Option 12, length 7: "hostname"
	    Parameter-Request Option 55, length 9:
	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
	      Default-Gateway, Domain-Name, Domain-Name-Server, Hostname
	      Option 119
	    END Option 255, length 0
	    PAD Option 0, length 0, occurs 27
14:07:26.710162 IP (tos 0xc0, ttl 64, id 13977, offset 0, flags [none], proto UDP (17), length 345)
    10.1.0.1.67 > 10.1.0.15.68: [bad udp cksum 0x1568 -> 0x37a9!] BOOTP/DHCP, Reply, length 317, xid 0x738d8779, secs 4, Flags [none] (0x0000)
	  Your-IP 10.1.0.15
	  Server-IP 10.1.0.1
	  Client-Ethernet-Address 00:16:3e:19:5e:75
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Offer
	    Server-ID Option 54, length 4: 10.1.0.1
	    Lease-Time Option 51, length 4: 43200
	    RN Option 58, length 4: 21600
	    RB Option 59, length 4: 37800
	    Subnet-Mask Option 1, length 4: 255.255.255.0
	    BR Option 28, length 4: 10.1.0.255
	    Default-Gateway Option 3, length 4: 10.1.0.1
	    Domain-Name-Server Option 6, length 4: 10.1.0.1
	    Domain-Name Option 15, length 14: "localdomain"
	    Hostname Option 12, length 7: "hostname"
	    END Option 255, length 0
>How-To-Repeat:
Execute a dhclient xn0 on the Guest.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-xen 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Apr 26 01:21:47 UTC 2014 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188990 

From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
To: <bug-followup@FreeBSD.org>, <thomaszelch@gmail.com>
Cc:  
Subject: Re: bin/188990: [xen] dhclient(8) does not accept DHCP Offer on FreeBSD
 10 as Xen DomU Guest
Date: Sat, 26 Apr 2014 09:15:50 +0200

 Hello,
 
 Could you provide more info about the Dom0 kernel version?
 
 Roger.

From: Thomas Zelch <thomaszelch@gmail.com>
To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/188990: [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
Date: Sat, 26 Apr 2014 10:29:03 +0200

 Hi Roger,
 
 The Dom0 is running Arch Linux with the following Kernel:
 Linux central 3.14.1-1-ARCH #1 SMP PREEMPT Mon Apr 14 20:40:47 CEST 2014 =
 x86_64 GNU/Linux
 
 The Xen Version is 4.4.0.
 
 The DHCP Service is delivered by another DomU, running Arch Linux with =
 the same Kernel and dnsmasq 2.69.
 
 Regards,
 Thomas
 
 Am 26.04.2014 um 09:15 schrieb Roger Pau Monn=E9 <roger.pau@citrix.com>:
 
 > Hello,
 >=20
 > Could you provide more info about the Dom0 kernel version?
 >=20
 > Roger.
 

From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
To: <bug-followup@FreeBSD.org>, <thomaszelch@gmail.com>
Cc:  
Subject: Re: bin/188990: [xen] dhclient(8) does not accept DHCP Offer on FreeBSD
 10 as Xen DomU Guest
Date: Sat, 26 Apr 2014 10:35:12 +0200

 Could you try to move the DNS server to another host? There have been
 reports of failures on if_xn when sending/receiving data to/from other
 guests on the same host.
 
 I know this is not a valid log-term solution, but it could help in
 identifying the problem, which is probably related to PR 188261.
 
 Roger.

From: Thomas Zelch <thomaszelch@gmail.com>
To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
Cc: bug-followup@FreeBSD.org,
 thomaszelch@gmail.com
Subject: Re: bin/188990: [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
Date: Tue, 29 Apr 2014 23:11:31 +0200

 Hi Roger,
 
 I have just tried.
 When using a different Host for DHCP, everything seems to work fine.
 Any Ideas why this might be?
 
 If the problem is related to PR 188261, is there any way that i might =
 help narrow the problem down?
 
 Thomas
 
 Am 26.04.2014 um 10:35 schrieb Roger Pau Monn=E9 <roger.pau@citrix.com>:
 
 > Could you try to move the DNS server to another host? There have been
 > reports of failures on if_xn when sending/receiving data to/from other
 > guests on the same host.
 >=20
 > I know this is not a valid log-term solution, but it could help in
 > identifying the problem, which is probably related to PR 188261.
 >=20
 > Roger.
 
>Unformatted:
