diff options
| author | Dan McDonald <danmcd@joyent.com> | 2019-01-09 10:20:57 -0500 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2019-01-11 15:19:29 -0500 |
| commit | 52a8a3689155dc508c9686a72bf335793ca3dfcb (patch) | |
| tree | a5f272e514b2005676f3ccc020c8ddf15df37f05 | |
| parent | 4a74895e6ebb5c0234ebb920a7d1a250d3f7cf19 (diff) | |
| download | illumos-joyent-OS-7501.tar.gz | |
OS-7501 overlay(7D) can receive packets with DB_CKSUMFLAGS() setOS-7501
Reviewed 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. |
