#include LZO1X_H
#endif
+#include "address_cache.h"
#include "cipher.h"
#include "conf.h"
#include "connection.h"
/* It's a valid reply: now we know bidirectional communication
is possible using the address and socket that the reply
packet used. */
- n->status.udp_confirmed = true;
+ if(!n->status.udp_confirmed) {
+ n->status.udp_confirmed = true;
+ fprintf(stderr, "Updating address cache...\n");
+ if (!n->address_cache)
+ n->address_cache = open_address_cache(n);
+ reset_address_cache(n->address_cache, &n->address);
+ }
// Reset the UDP ping timer.
n->udp_ping_sent = now;