[Bug 188990] [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Jan 2024 10:00:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188990 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é 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 filled 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. 4. The BPF was hooked into driver part, it does not care checksums of packets 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é 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. -- You are receiving this mail because: You are the assignee for the bug.