Bugfix Third Party Filtering
This addresses issue #428.
- Filters like t/o would not work on 3rd Party packets since the payload was not inspected.
- Also budlist filter was applied on the outgoing igate and not on the payload. Budlist has to be apply on the payload as we want to filter the source of the packet. Outgoing igate shall be considered as a digipeater. This si also corrected here.
- Filters like t/{ still works same as before and will match any 3rd party packet.
Thank you for the submission, I agree that filtering should look inside of third party packets and operate on the actual payload, The commits don't look right because they reference 17 files, mostly updates I made recently. I need some time to think about the different cases, add to the automated test cases, and figure out how to revise the documentation,
Well I made the fixes in a separate branch and messed up merging your dev branch into it. The relevant commit are all the ones prior to 157d874, everything else is me failing to properly merge your dev branch in to my bugfix branch.
Is this commit an attempt to fix this issue ? https://github.com/wb2osz/direwolf/commit/e84a6225151b260c0a87c790e5461fcfca6a7348
pfilter all ready called decode_aprs at the beginning to parse the packet and extract various properties. There was a lot of duplication of functionality in these two places, perhaps done inconsistently. It made sense, to me, for pfilter to rely on the work already done by decode_aprs rather duplicate the functionality. New self-test cases were added to pfilter to check behavior for packets wrapped in third party headers. Does this have the same functionality you were looking for?
As I am reading your reply it all makes sense and seem to have simplified the code somewhat. It makes sense to only not duplicate same functionality all over the place. I will test this during a couple of days and let you know the what comes out.
Ok, I just gave this https://github.com/wb2osz/direwolf/commit/e84a6225151b260c0a87c790e5461fcfca6a7348 a try. Unfortunately it is not working.
I have following filter to prevent digipeating of objects, items and telemetry
FILTER 0 0 !t/oith
Unfortunately this does not work as soon as the object or items are encapsulated into 3rd party. Even h filter has no effect....
EDIT: Nevermind, my test 3rd party frame was malformed and categorized as something else. It is working. Iw ill conduct some more tests and close the issue asap.