diff options
author | Dan McDonald <danmcd@joyent.com> | 2019-01-09 10:20:57 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-01-14 19:32:51 -0500 |
commit | 9c8d4a1a37ad374d40250c38a5103106b29903a6 (patch) | |
tree | f0bbc6a5b6400309df32e88461e698a2f59261b0 | |
parent | 3261980fc834080481df409165235747db001b84 (diff) | |
download | illumos-joyent-9c8d4a1a37ad374d40250c38a5103106b29903a6.tar.gz |
OS-7501 overlay(7D) can receive packets with DB_CKSUMFLAGS() set
Reviewed by: Ryan Zezeski <rpz@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Ryan Zezeski <rpz@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/overlay/overlay_mux.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/usr/src/uts/common/io/overlay/overlay_mux.c b/usr/src/uts/common/io/overlay/overlay_mux.c index 9f70e8c83e..58e9f2665d 100644 --- a/usr/src/uts/common/io/overlay/overlay_mux.c +++ b/usr/src/uts/common/io/overlay/overlay_mux.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -26,6 +26,7 @@ #include <sys/ksocket.h> #include <sys/avl.h> #include <sys/list.h> +#include <sys/pattr.h> #include <sys/sysmacros.h> #include <sys/strsubr.h> #include <sys/strsun.h> @@ -123,8 +124,21 @@ overlay_mux_recv(ksocket_t ks, mblk_t *mpchain, size_t msgsize, int oob, */ fmp = mp; mp = fmp->b_cont; - fmp->b_cont = NULL; - freemsg(fmp); + freeb(fmp); + + /* + * Until we have VXLAN-or-other-decap HW acceleration support + * (e.g. we support NICs that reach into VXLAN-encapsulated + * packets and check the inside-VXLAN IP packets' checksums, + * or do LSO with VXLAN), we should clear any HW-accelerated- + * performed bits. + * + * We do this, even in cases of HW_LOCAL_MAC, because we + * absolutely have NO context about the inner packet. + * It could've arrived off an external NIC and been forwarded + * to the overlay network, which means no context. + */ + DB_CKSUMFLAGS(mp) = 0; /* * Decap and deliver. |