Reply to I frames outside of SABM(E) with DM

This commit is contained in:
XANTRONIX 2020-07-10 16:56:44 -04:00 committed by XANTRONIX Industrial
parent 5be0f40405
commit 1265108efd

View file

@ -1230,16 +1230,8 @@ static int handle_i(patty_ax25_server *server,
patty_ax25_if *iface,
patty_ax25_sock *sock,
patty_ax25_frame *frame) {
if (sock == NULL) {
return 0;
}
if (sock->status != PATTY_AX25_SOCK_ESTABLISHED) {
/*
* TODO: Figure out how to respond to a packet sent to a socket not
* in an established state
*/
return 0;
if (sock == NULL || sock->status != PATTY_AX25_SOCK_ESTABLISHED) {
return reply_dm(iface, frame, PATTY_AX25_FRAME_FINAL);
}
/*