fix tun
This commit is contained in:
parent
86c7739ee0
commit
7cbc95759e
@ -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("[sdlan_stun] stun_request network_id: ~p: ~p, not found", [NetworkId]),
|
lager:debug("[sdlan_stun] stun_request network_id: ~p, client_id: ~p, not found", [NetworkId, ClientId]),
|
||||||
{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("[sdlan_stun] stun_request network_id: ~p, hole: ~p", [NetworkId, {Ip, Port}]),
|
lager:debug("[sdlan_stun] stun_request network_id: ~p, client_id: ~p, hole: ~p", [NetworkId, ClientId, {Ip, Port}]),
|
||||||
{noreply, State}
|
{noreply, State}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user