Release received packets when cold NAT priority defers PONG
This commit is contained in:
1 parent
bb01f243fe
commit
179aa0ef35
1 file changed
+3
-1
@@ -1796,7 +1796,9 @@ static int handle_ping(struct ETCP_SOCKET* e_sock, struct ETCP_DGRAM* pkt, const
|
||||
if ((flags & ETCP_PING_FLAG_OBSERVE) && (flags & ETCP_PING_FLAG_ADDRESS_CHECK)) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_NAT, "UDP probe has incompatible flags=%02x", flags); return 7;
|
||||
}
|
||||
if (!nat_detection_ping_allowed(e_sock->instance->nat_det, e_sock, decrypted_pubkey, addr, flags, udata, ulen)) return 0;
|
||||
if (!nat_detection_ping_allowed(e_sock->instance->nat_det, e_sock, decrypted_pubkey, addr, flags, udata, ulen)) {
|
||||
memory_pool_free(e_sock->instance->pkt_pool, pkt); return 0;
|
||||
}
|
||||
if ((flags & ETCP_PING_FLAG_OBSERVE) && e_sock->instance->nat_det) {
|
||||
nat_detection_record_observation(e_sock->instance->nat_det, e_sock, decrypted_pubkey, addr, udata, ulen);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user