]> git.sesse.net Git - greproxy/blobdiff - greprotocol.cpp
Make GREProtocol no longer make its own sequence numbers.
[greproxy] / greprotocol.cpp
index 2fb2503d3e0cbc240d9220e5c072cf24ca79edd0..5fd4e4b8262a69be62098fb41524a2b228b7602f 100644 (file)
@@ -24,7 +24,6 @@ struct gre_header {
 
 
 GREProtocol::GREProtocol(const in6_addr &src, const in6_addr &dst)
-       : seq(0)
 {
        memset(&dstaddr, 0, sizeof(dstaddr));
        dstaddr.sin6_family = AF_INET6;
@@ -57,7 +56,7 @@ void GREProtocol::send_packet(uint16_t proto, const string &data, int incoming_s
        gre->protocol_type = htons(proto);
 
        char *ptr = buf + sizeof(*gre);
-       int seq_be = htonl(seq++);  // Ignore incoming_seq.
+       int seq_be = htonl(incoming_seq);
        memcpy(ptr, &seq_be, sizeof(seq_be));
        ptr += sizeof(seq_be);