diff options
-rw-r--r-- | src/openvpn/openvpn.h | 2 | ||||
-rw-r--r-- | src/openvpn/push.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/openvpn/openvpn.h b/src/openvpn/openvpn.h index 0732d0f..7abfb08 100644 --- a/src/openvpn/openvpn.h +++ b/src/openvpn/openvpn.h @@ -448,7 +448,7 @@ struct context_2 /* --ifconfig endpoints to be pushed to client */ bool push_reply_deferred; bool push_ifconfig_defined; - bool sent_push_reply; + time_t sent_push_reply_expiry; in_addr_t push_ifconfig_local; in_addr_t push_ifconfig_remote_netmask; #ifdef ENABLE_CLIENT_NAT diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 8d7d23a..05a38e0 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -416,7 +416,10 @@ process_incoming_push_msg (struct context *c, } else if (!c->c2.push_reply_deferred && c->c2.context_auth == CAS_SUCCEEDED) { - if (c->c2.sent_push_reply) + time_t now; + + openvpn_time(&now); + if (c->c2.sent_push_reply_expiry > now) { ret = PUSH_MSG_ALREADY_REPLIED; } @@ -425,7 +428,7 @@ process_incoming_push_msg (struct context *c, if (send_push_reply (c)) { ret = PUSH_MSG_REQUEST; - c->c2.sent_push_reply = true; + c->c2.sent_push_reply_expiry = now + 30; } } } |