Releasing 1.1pre5.
[tinc] / src / sptps.c
index 386b6fd..fe97844 100644 (file)
@@ -1,6 +1,6 @@
 /*
     sptps.c -- Simple Peer-to-Peer Security
-    Copyright (C) 2011-2012 Guus Sliepen <guus@tinc-vpn.org>,
+    Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>,
                   2010      Brandon L. Black <blblack@gmail.com>
 
     This program is free software; you can redistribute it and/or modify
@@ -486,6 +486,10 @@ static bool sptps_receive_data_datagram(sptps_t *s, const char *data, size_t len
        if(seqno > s->inseqno)
                s->inseqno = seqno + 1;
 
+       if(!s->inseqno)
+               s->received = 0;
+       else
+               s->received++;
 
        // Decrypt.
        cipher_set_counter(&s->incipher, &seqno, sizeof seqno);