diff --git a/src/server.c b/src/server.c index a472de1..117f10b 100644 --- a/src/server.c +++ b/src/server.c @@ -1321,12 +1321,20 @@ static int handle_xid(patty_ax25_server *server, } /* - * TODO: Actually do something with the parameters received; also perhaps - * consider replying to this XID frame with another XID frame + * Since we've received an XID packet, we can assume that the remote + * station is capable of speaking AX.25 v2.2. Therefore, we should + * upgrade the socket defaults accordingly, and negotiate downwards + * as necessary. */ + patty_ax25_sock_upgrade(sock); + + if (patty_ax25_sock_params_set(sock, ¶ms) < 0) { + goto error_sock_params_set; + } return 0; +error_sock_params_set: error_io: return -1; }