diff --git a/pkg/packetbrokeragent/agent.go b/pkg/packetbrokeragent/agent.go index c8a99fced2..cb000bfc4b 100644 --- a/pkg/packetbrokeragent/agent.go +++ b/pkg/packetbrokeragent/agent.go @@ -178,7 +178,7 @@ func New(c *component.Component, conf *Config, opts ...Option) (*Agent, error) { } devAddrPrefix := types.DevAddrPrefix{ DevAddr: devAddr, - Length: uint8(conf.NetID.IDBits()), + Length: uint8(32 - types.NwkAddrBits(conf.NetID)), } devAddrPrefixes = append(devAddrPrefixes, devAddrPrefix) }