FreeBSD Bugzilla – Attachment 180347 Details for
Bug 188990
[xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dhclient: skip UDP checksum validation if Rx checksum offload in effect
0001-dhclient-skip-UDP-checksum-validation-if-Rx-checksum.patch (text/plain), 1.62 KB, created by
Bhavesh Davda
on 2017-02-27 19:15:13 UTC
(
hide
)
Description:
dhclient: skip UDP checksum validation if Rx checksum offload in effect
Filename:
MIME Type:
Creator:
Bhavesh Davda
Created:
2017-02-27 19:15:13 UTC
Size:
1.62 KB
patch
obsolete
>From a04907f33054271070d932a810c25e6326157ebb Mon Sep 17 00:00:00 2001 >From: bhavesh.davda <bhavesh.davda@oracle.com> >Date: Mon, 27 Feb 2017 11:03:48 -0800 >Subject: [PATCH] dhclient: skip UDP checksum validation if Rx checksum offload in effect > >Some ifnet drivers support UDP checksum validation offload on receive, and >set the UDP checksum in the received packet to 0xFFFF in the process. > >This change makes dhclient skip UDP checksum validation if it detects this to >be the case. > >Signed-off-by: bhavesh.davda <bhavesh.davda@oracle.com> >--- > sbin/dhclient/packet.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/sbin/dhclient/packet.c b/sbin/dhclient/packet.c >index 859f48b..5f108f5 100644 >--- a/sbin/dhclient/packet.c >+++ b/sbin/dhclient/packet.c >@@ -198,8 +198,8 @@ decode_udp_ip_header(unsigned char *buf, int bufix, struct sockaddr_in *from, > > /* > * Compute UDP checksums, including the ``pseudo-header'', the >- * UDP header and the data. If the UDP checksum field is zero, >- * we're not supposed to do a checksum. >+ * UDP header and the data. If the UDP checksum field is zero >+ * or 0xffff (offloaded) we're not supposed to do a checksum. > */ > if (!data) { > data = buf + bufix + ip_len + sizeof(*udp); >@@ -231,7 +231,7 @@ decode_udp_ip_header(unsigned char *buf, int bufix, struct sockaddr_in *from, > IPPROTO_UDP + (u_int32_t)ntohs(udp->uh_ulen))))); > > udp_packets_seen++; >- if (usum && usum != sum) { >+ if (usum && (u_short)usum != 0xffff && usum != sum) { > udp_packets_bad_checksum++; > if (udp_packets_seen > 4 && > (udp_packets_seen / udp_packets_bad_checksum) < 2) { >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 188990
:
180307
|
180335
| 180347