Skip to content

Commit 8587496

Browse files
committed
Check 3rd party payload for APRS type #428
1 parent 3973627 commit 8587496

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/pfilter.c

+13
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,19 @@ static int filt_t (pfstate_t *pf)
869869

870870
assert (infop != NULL);
871871

872+
if(*infop == '}') {
873+
// We have a 3d party packet, dig inside it to get the actual type.
874+
packet_t pp_payload = ax25_from_text ((char*)infop+1, 0);
875+
if (pp_payload == NULL) {
876+
print_error (pf, "Invalid third party payload\n");
877+
return (0);
878+
}
879+
memset (src, 0, sizeof(src));
880+
ax25_get_addr_with_ssid (pp_payload, AX25_SOURCE, src);
881+
(void) ax25_get_info (pp_payload, (unsigned char **)(&infop));
882+
ax25_delete(pp_payload);
883+
}
884+
872885
for (f = pf->token_str + 2; *f != '\0'; f++) {
873886
switch (*f) {
874887

0 commit comments

Comments
 (0)