This commit is contained in:
anlicheng 2025-05-21 10:30:26 +08:00
parent 57de692e71
commit e55934cf65

View File

@ -121,7 +121,7 @@ handle_info({tcp, Sock, <<PacketId:32, ?PACKET_REGISTER_SUPER, Body/binary>>}, S
#sdl_register_super{version = Version, client_id = ClientId, dev_addr = #sdl_dev_addr{net_addr = NetAddr0, mac = Mac}, token = Token, pub_key = PubKey} = sdlan_pb:decode_msg(Body, sdl_register_super), #sdl_register_super{version = Version, client_id = ClientId, dev_addr = #sdl_dev_addr{net_addr = NetAddr0, mac = Mac}, token = Token, pub_key = PubKey} = sdlan_pb:decode_msg(Body, sdl_register_super),
%% %%
lager:debug("[sdlan_channel] client_id: ~p, assert0: ~p, assert1: ~p, assert2: ~p", [ClientId, Mac =/= <<>>, PubKey =/= <<>>, ClientId =/= <<>>]), lager:debug("[sdlan_channel] client_id: ~p, public_key: ~p", [ClientId, PubKey]),
true = (Mac =/= <<>> andalso PubKey =/= <<>> andalso ClientId =/= <<>>), true = (Mac =/= <<>> andalso PubKey =/= <<>> andalso ClientId =/= <<>>),
%% Mac地址不能是广播地址 %% Mac地址不能是广播地址
true = not (sdlan_util:is_multicast_mac(Mac) orelse sdlan_util:is_broadcast_mac(Mac)), true = not (sdlan_util:is_multicast_mac(Mac) orelse sdlan_util:is_broadcast_mac(Mac)),