chiark / gitweb /
New encrypting tunnel seems to work !
[userv-utils] / ipif / mech-timestamp.c
index f679b104e625c889308a1274f07b3cb7466fdf4a..226f23f830d135a204fef14f4c110c4b054e3847 100644 (file)
 #include <stdint.h>
 #include <netinet/in.h>
 
-#include "mech.h"
+#include "forwarder.h"
 
 struct mechdata {
-  uint32_t max_skew, max_age;
+  time_t max_skew, max_age;
 };
 
 static void mds_timestamp(struct mechdata **md_r) {
@@ -56,7 +56,7 @@ static const char *mdec_timestamp(struct mechdata *md, struct buffer *buf) {
       return cbuf;
     }
   } else if (age < 0) {
-    if (md->max_skew && age md->max_skew) {
+    if (md->max_skew && age < -md->max_skew) {
       sprintf(cbuf,"too much skew (%lds)",-age);
       return cbuf;
     }