Compute the checksum on outgoing Metacube packets as well.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 00:54:54 +0000 (02:54 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 00:54:54 +0000 (02:54 +0200)
stream.cpp

index e88ad77..42edee9 100644 (file)
@@ -226,6 +226,7 @@ void Stream::add_data_deferred(const char *data, size_t bytes, StreamStartSuitab
                if (suitable_for_stream_start == NOT_SUITABLE_FOR_STREAM_START) {
                        hdr.flags |= htons(METACUBE_FLAGS_NOT_SUITABLE_FOR_STREAM_START);
                }
+               hdr.csum = htons(metacube2_compute_crc(&hdr));
 
                iovec iov;
                iov.iov_base = new char[bytes + sizeof(hdr)];