-/* $OpenBSD: if_xnf.c,v 1.62 2017/12/09 14:00:21 mikeb Exp $ */
+/* $OpenBSD: if_xnf.c,v 1.63 2018/01/20 20:03:45 mikeb Exp $ */
/*
* Copyright (c) 2015, 2016 Mike Belopuhov
if (error == 0 && res == 1)
sc->sc_caps |= XNF_CAP_SG;
+#if 0
/* Query IPv4 checksum offloading capability, enabled by default */
sc->sc_caps |= XNF_CAP_CSUM4;
prop = "feature-no-csum-offload";
goto errout;
if (error == 0 && res == 1)
sc->sc_caps |= XNF_CAP_CSUM6;
+#endif
/* Query multicast traffic contol capability */
prop = "feature-multicast-control";
goto errout;
}
+ /* Disable IPv4 checksum offloading */
+ if (!(sc->sc_caps & XNF_CAP_CSUM4)) {
+ prop = "feature-no-csum-offload";
+ if (xs_setnum(sc->sc_parent, sc->sc_node, prop, 1))
+ goto errout;
+ }
+
/* Enable IPv6 checksum offloading */
if (sc->sc_caps & XNF_CAP_CSUM6) {
prop = "feature-ipv6-csum-offload";