diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-03-11 14:31:35 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-03-11 14:31:35 +0000 |
commit | 550302f8427d89f30665f0c29772f1f42660913c (patch) | |
tree | ec427efd4ebeb60b10d32f777d7a1ff6a75adfa0 | |
parent | 9f607fad0782dae58b0fc876312ea2610440ffb3 (diff) |
Workaround an Azure UDP transmit checksum offloading bug
According to https://reviews.freebsd.org/D12429, UDP transmit checksum
offloading doesn't work in Azure when sizeof(IP hdr + UDP hdr + payload)
is greater than 1420 and don't fragment bit isn't set in the IP header.
Instead of peeking into the packet and attempting to fix the fallout, we
restrict UDP checksum offloading to NDIS versions newer than the one used
in Azure (6.30) in an attempt to keep the feature enabled. Unfortunately,
there's no way to tell Azure apart from a standalone Hyper-V to make this
check more precise.
-rw-r--r-- | sys/dev/pv/if_hvn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c index 37133c87e4a..3ca35165565 100644 --- a/sys/dev/pv/if_hvn.c +++ b/sys/dev/pv/if_hvn.c @@ -271,7 +271,7 @@ hvn_attach(struct device *parent, struct device *self, void *aux) ifp->if_capabilities = IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_TCPv6; - if (sc->sc_ndisver >= NDIS_VERSION_6_30) + if (sc->sc_ndisver > NDIS_VERSION_6_30) ifp->if_capabilities |= IFCAP_CSUM_UDPv4 | IFCAP_CSUM_UDPv6; if (sc->sc_proto >= HVN_NVS_PROTO_VERSION_2) { |