Don't throw error on failure to decode frames

Fix src/server.c, handle_frame() to not throw an error when encountering
errors decoding invalid frames
This commit is contained in:
XANTRONIX Development 2020-08-09 13:16:21 -04:00 committed by XANTRONIX Industrial
parent b99a6607ba
commit 40408060de

View file

@ -1709,7 +1709,7 @@ static int handle_frame(patty_ax25_server *server,
patty_ax25_sock *sock;
if ((decoded = patty_ax25_frame_decode_address(&frame, buf, len)) < 0) {
goto error_io;
goto error_decode;
} else {
offset += decoded;
}
@ -1723,7 +1723,7 @@ static int handle_frame(patty_ax25_server *server,
}
if ((decoded = patty_ax25_frame_decode_control(&frame, format, buf, offset, len)) < 0) {
goto error_io;
goto error_decode;
} else {
offset += decoded;
}
@ -1747,10 +1747,10 @@ static int handle_frame(patty_ax25_server *server,
return 0;
error_io:
error_decode:
iface->stats.dropped++;
return -1;
return 0;
}
static int handle_iface(patty_ax25_server *server, patty_ax25_if *iface) {