From 8b94bb087c21b87b5c879ade2f5a9ff70aac1862 Mon Sep 17 00:00:00 2001 From: Adrian-Stefan Mares Date: Thu, 19 Oct 2023 17:37:52 +0200 Subject: [PATCH] ns: Fix panic on empty device address --- pkg/networkserver/grpc_deviceregistry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/networkserver/grpc_deviceregistry.go b/pkg/networkserver/grpc_deviceregistry.go index c0e84fcfc9..b89a10d032 100644 --- a/pkg/networkserver/grpc_deviceregistry.go +++ b/pkg/networkserver/grpc_deviceregistry.go @@ -2137,7 +2137,7 @@ func (ns *NetworkServer) Set(ctx context.Context, req *ttnpb.SetEndDeviceRequest "pending_mac_state.queued_join_accept.payload": func() bool { return len(st.Device.PendingMacState.QueuedJoinAccept.Payload) == 0 }, "pending_mac_state.queued_join_accept.dev_addr": types.MustDevAddr( st.Device.PendingMacState.QueuedJoinAccept.DevAddr, - ).IsZero, + ).OrZero().IsZero, } { p, isZero := p, isZero if err := st.ValidateSetField(func() bool { return !isZero() }, p); err != nil {