]> git.sesse.net Git - greproxy/blobdiff - greprotocol.cpp
Merge branch 'master' of /srv/git.sesse.net/www/greproxy
[greproxy] / greprotocol.cpp
index d3daa9c829ae9a14c100291405312595f9a63664..6f3513039ed67e00706bd2458cab0970c0cb3764 100644 (file)
@@ -51,7 +51,7 @@ GREProtocol::GREProtocol(const in6_addr &src, const in6_addr &dst)
        }
 }
 
-void GREProtocol::send_packet(uint16_t proto, const string &data, int incoming_seq)
+void GREProtocol::send_packet(uint16_t proto, const string &data, uint32_t incoming_seq)
 {
        char buf[4096];
        gre_header *gre = (gre_header *)buf;
@@ -62,7 +62,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(incoming_seq);
+       uint32_t seq_be = htonl(incoming_seq);
        memcpy(ptr, &seq_be, sizeof(seq_be));
        ptr += sizeof(seq_be);