Date: Mon, 15 Jan 2024 10:00:59 +0000 From: bugzilla-noreply@freebsd.org To: xen@FreeBSD.org Subject: [Bug 188990] [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest Message-ID: <bug-188990-23905-Flyjdxw5Wj@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-188990-23905@https.bugs.freebsd.org/bugzilla/> References: <bug-188990-23905@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D188990 Zhenlei Huang <zlei@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zlei@FreeBSD.org --- Comment #25 from Zhenlei Huang <zlei@FreeBSD.org> --- (In reply to Roger Pau Monn=C3=A9 from comment #24) I spent sometime diagnosing this issue. From the code how kernel process inbound UDP packets and how BPF works, I may conclude this issue is caused = by a combination of 1. Dom0 Virtual NIC does not really calculate the checksum of outbound UDP packets ( if TXCSUM is enabled, which cheat the Dom0 kernel not do soft checksum calculatation ), and only some *flags* are set on the internal presentation of packets, but the packets' on-wire checksum field is not fil= led with correct value. 2. DomU Virtual NIC' RXCSUM does not matter. If the internal presentation = of UDP packets have *flags* then those packets are marked valid. If not then it make no difference between re-calculating in driver and kernel. 3. DomU guest (FreeBSD) kernel will check and drop inbound UDP packets with invalid checksum.=20 4. The BPF was hooked into driver part, it does not care checksums of pack= ets and pass them as is to consumers such as DHCP client. And BPF consumers will have to re-calculate the checksum by themself. 5. Unfortunately BPF consumer (DHCP client) would definitely got wrong checksum and it is not the fault of BPF consumers. So it sound like a design defect of BPF, which does not have a way to pass checksum (offload) information to its consumers. @Roger Pau Monn=C3=A9 I bet disabling DomU Virtual NIC' RXCSUM feature will not help. I think it is more a hack to workaround the problem in BPF consumers' code.= The right approach should be disable Dom0 Virtual NIC's TXCSUM offload feature (large impact), or using firewall rules (on Dom0 side) to calculate and fill UDP checksum of outbound packets from DHCP server application. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-188990-23905-Flyjdxw5Wj>