diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-09 07:13:45 +0300 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-08-09 08:58:08 +0300 |
| commit | f49ed06b26b2b3ea3a97589be2e51ceb2a084243 (patch) | |
| tree | de90fb65568a0be8b6e40c311ab9bddf91aeddbf | |
| parent | 2ad648c3cdde7c5b439abde9566c6dedce966c9e (diff) | |
| download | accel-ppp-f49ed06b26b2b3ea3a97589be2e51ceb2a084243.tar.gz accel-ppp-f49ed06b26b2b3ea3a97589be2e51ceb2a084243.zip | |
pptp: close call socket when Outgoing-Call-Reply cannot be sent
The PPPoX socket created for the call is only handed to conn->ppp.fd
after the reply has been posted, so returning early on a post_msg()
failure leaks the descriptor: disconnect() knows nothing about it and
establish_ppp() has not run yet. The establish_ppp() failure path just
below already closes it.
| -rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index b323dba6..20f8495d 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -393,8 +393,10 @@ static int pptp_out_call_rqst(struct pptp_conn_t *conn) return -1; } - if (send_pptp_out_call_rply(conn, msg, src_addr.sa_addr.pptp.call_id, PPTP_CALL_RES_OK, 0)) + if (send_pptp_out_call_rply(conn, msg, src_addr.sa_addr.pptp.call_id, PPTP_CALL_RES_OK, 0)) { + close(pptp_sock); return -1; + } conn->call_id = src_addr.sa_addr.pptp.call_id; conn->peer_call_id = msg->call_id; |
