Implement support for handling SABME frames
This commit is contained in:
parent
905d5b117c
commit
359742f949
1 changed files with 11 additions and 8 deletions
|
@ -1074,9 +1074,11 @@ static int handle_sabm(patty_ax25_server *server,
|
|||
}
|
||||
|
||||
remote->status = PATTY_AX25_SOCK_ESTABLISHED;
|
||||
remote->mode = PATTY_AX25_SOCK_SABM;
|
||||
remote->iface = iface;
|
||||
|
||||
remote->mode = (frame->type == PATTY_AX25_FRAME_SABM)?
|
||||
PATTY_AX25_SOCK_SABM: PATTY_AX25_SOCK_SABME;
|
||||
|
||||
save_reply_addr(remote, frame);
|
||||
|
||||
if (sock_save_by_fd(server->socks_by_fd, remote) < 0) {
|
||||
|
@ -1316,9 +1318,10 @@ static int handle_frame(patty_ax25_server *server,
|
|||
|
||||
switch (frame.type) {
|
||||
case PATTY_AX25_FRAME_I: return handle_i(server, iface, sock, &frame);
|
||||
case PATTY_AX25_FRAME_SABM: return handle_sabm(server, iface, &frame);
|
||||
case PATTY_AX25_FRAME_UA: return handle_ua(server, iface, &frame);
|
||||
case PATTY_AX25_FRAME_DM: return handle_dm(server, iface, &frame);
|
||||
case PATTY_AX25_FRAME_SABM:
|
||||
case PATTY_AX25_FRAME_SABME: return handle_sabm(server, iface, &frame);
|
||||
case PATTY_AX25_FRAME_DISC: return handle_disc(server, iface, &frame);
|
||||
case PATTY_AX25_FRAME_FRMR: return 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue