This commit is contained in:
anlicheng 2025-10-23 12:56:25 +08:00
parent d9ce62338c
commit f7ec3ee31b

View File

@ -103,7 +103,7 @@ handle_info({udp, Sock, Ip, Port, <<?PACKET_STUN_REQUEST:8, Body/binary>>}, Stat
case sdlan_network:get_pid(NetworkId) of case sdlan_network:get_pid(NetworkId) of
undefined -> undefined ->
lager:debug("call me here stun request 11: ~p", [NetworkId]), lager:debug("[sdlan_stun] stun_request network_id: ~p: ~p, not found", [NetworkId]),
{noreply, State}; {noreply, State};
NetworkPid when is_pid(NetworkPid) -> NetworkPid when is_pid(NetworkPid) ->
sdlan_network:update_hole(NetworkPid, ClientId, Mac, {Ip, Port}, NatType, V6Info), sdlan_network:update_hole(NetworkPid, ClientId, Mac, {Ip, Port}, NatType, V6Info),
@ -111,7 +111,7 @@ handle_info({udp, Sock, Ip, Port, <<?PACKET_STUN_REQUEST:8, Body/binary>>}, Stat
cookie = Cookie cookie = Cookie
}), }),
ok = gen_udp:send(Sock, Ip, Port, <<?PACKET_STUN_REPLY, StunReply/binary>>), ok = gen_udp:send(Sock, Ip, Port, <<?PACKET_STUN_REPLY, StunReply/binary>>),
lager:debug("call me here stun request 12"), lager:debug("[sdlan_stun] stun_request network_id: ~p, hole: ~p", [NetworkId, {Ip, Port}]),
{noreply, State} {noreply, State}
end; end;