wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.51k stars 299 forks source link

Specified PID is ignored when sending Unproto using AGWPE #527

Closed mfncooper closed 2 months ago

mfncooper commented 2 months ago

When sending an Unproto message using AGWPE, Direwolf ignores the PID value specified in the AGWPE 'M' frame and always sets it to 0xF0 in the outgoing message. This makes it impossible to send NET/ROM routing broadcasts, which require a PID value of 0xCF, using AGWPE with Direwolf.

This is noted as a bug in the code:

https://github.com/wb2osz/direwolf/blob/dev/src/server.c#L2014

It would make sense, I think, for an invalid PID value of 0 to be converted to 0xF0, but where a valid (or non-zero) PID value is specified, it should be honored.

Unfortunately, the code further assumes that the data being sent in the Unproto message is always text, and uses ax25_from_text() to create the frame. This is not appropriate for messages such as NET/ROM routing broadcasts which contain binary data.

wb2osz commented 2 months ago

Thank you for pointing out this issue. This should be resolved in the "dev" branch.