Remove FRMR responses from server
Remove FRMR responses from server, as they are not included in the current AX.25 v2.2 standard
This commit is contained in:
parent
9066fe10da
commit
34353fa1d9
1 changed files with 4 additions and 16 deletions
20
src/server.c
20
src/server.c
|
@ -1040,19 +1040,6 @@ static int reply_ua(patty_ax25_if *iface,
|
|||
return reply_to(iface, frame, &reply);
|
||||
}
|
||||
|
||||
static int reply_frmr(patty_ax25_if *iface,
|
||||
patty_ax25_frame *frame,
|
||||
int flag) {
|
||||
patty_ax25_frame reply = {
|
||||
.control = PATTY_AX25_FRAME_FRMR | (flag << 4),
|
||||
.proto = PATTY_AX25_PROTO_NONE,
|
||||
.info = NULL,
|
||||
.infolen = 0
|
||||
};
|
||||
|
||||
return reply_to(iface, frame, &reply);
|
||||
}
|
||||
|
||||
static int handle_sabm(patty_ax25_server *server,
|
||||
patty_ax25_if *iface,
|
||||
patty_ax25_frame *frame) {
|
||||
|
@ -1141,7 +1128,7 @@ static int handle_ua(patty_ax25_server *server,
|
|||
if ((sock = sock_by_addrpair(server->socks_pending_connect,
|
||||
&frame->dest,
|
||||
&frame->src)) == NULL) {
|
||||
return reply_frmr(iface, frame, PATTY_AX25_FRAME_FINAL);
|
||||
return reply_dm(iface, frame, PATTY_AX25_FRAME_FINAL);
|
||||
}
|
||||
|
||||
if ((client = client_by_sock(server, sock)) < 0) {
|
||||
|
@ -1269,13 +1256,14 @@ static int handle_disc(patty_ax25_server *server,
|
|||
if ((sock = sock_by_addrpair(server->socks_established,
|
||||
&frame->dest,
|
||||
&frame->src)) == NULL) {
|
||||
return reply_frmr(iface, frame, PATTY_AX25_FRAME_FINAL);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (sock_close(server, sock) < 0) {
|
||||
goto error_sock_delete;
|
||||
}
|
||||
|
||||
done:
|
||||
if (frame->pf) {
|
||||
return reply_dm(iface, frame, PATTY_AX25_FRAME_FINAL);
|
||||
}
|
||||
|
@ -1329,7 +1317,7 @@ static int handle_frame(patty_ax25_server *server,
|
|||
break;
|
||||
}
|
||||
|
||||
return reply_frmr(iface, &frame, PATTY_AX25_FRAME_FINAL);
|
||||
return 0;
|
||||
|
||||
error_io:
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue