Skip to content

Commit

Permalink
ns: Fix panic on empty device address
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansmares committed Oct 19, 2023
1 parent 3c9cf14 commit 8b94bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/networkserver/grpc_deviceregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8b94bb0

Please sign in to comment.