markqvist / Reticulum

The cryptography-based networking stack for building unstoppable networks with LoRa, Packet Radio, WiFi and everything in between.
https://reticulum.network
MIT License
2k stars 124 forks source link

Looks like a bug in get_packed_flags in Packet #275

Closed sergst83 closed 1 year ago

sergst83 commented 1 year ago

https://github.com/markqvist/Reticulum/blob/fac4973329ff50bc554ce129b896459af9e453c2/RNS/Packet.py#L144

I suppose it should look something like this:

packed_flags = (self.header_type << 6) | (self.transport_type << 4) | RNS.Destination.LINK << 2 | self.packet_type

to comply with the package header structure documentation

markqvist commented 1 year ago

It sure does! Thanks for reporting this!