diff options
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 4 | ||||
-rw-r--r-- | accel-pppd/ctrl/l2tp/packet.c | 2 | ||||
-rw-r--r-- | accel-pppd/ctrl/pppoe/cli.c | 2 | ||||
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 2 | ||||
-rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index f6df3af7..3a7c15f5 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -961,10 +961,10 @@ static int l2tp_conn_read(struct triton_md_handler_t *h) } else { if (ntohs(pack->hdr.Ns) < conn->Nr + 1 || (ntohs(pack->hdr.Ns > 32767 && conn->Nr + 1 < 32767))) { log_ppp_debug("duplicate packet\n"); - //if (l2tp_send_ZLB(conn)) - // goto drop; if (!list_empty(&conn->send_queue)) l2tp_retransmit(conn); + else if (l2tp_send_ZLB(conn)) + goto drop; } else log_ppp_debug("reordered packet\n"); l2tp_packet_free(pack); diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c index 60b9d36c..70d8d5d9 100644 --- a/accel-pppd/ctrl/l2tp/packet.c +++ b/accel-pppd/ctrl/l2tp/packet.c @@ -158,7 +158,7 @@ int l2tp_recv(int fd, struct l2tp_packet_t **p, struct in_pktinfo *pkt_info) if (n < sizeof(*hdr)) { if (conf_verbose) - log_warn("l2tp: short packet received (%i/%i)\n", n, sizeof(*hdr)); + log_warn("l2tp: short packet received (%i/%zu)\n", n, sizeof(*hdr)); goto out_err_hdr; } diff --git a/accel-pppd/ctrl/pppoe/cli.c b/accel-pppd/ctrl/pppoe/cli.c index 847b8547..26846402 100644 --- a/accel-pppd/ctrl/pppoe/cli.c +++ b/accel-pppd/ctrl/pppoe/cli.c @@ -120,7 +120,7 @@ static int show_service_name_exec(const char *cmd, char * const *f, int f_cnt, v if (conf_service_name) cli_sendv(cli, "%s\r\n", conf_service_name); else - cli_sendv(cli, "*\r\n", conf_service_name); + cli_sendv(cli, "*\r\n"); return CLI_CMD_OK; } diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index e620668f..f36a1cc5 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -1350,7 +1350,7 @@ static int init_secret(struct pppoe_serv_t *serv) DES_cblock key; if (read(urandom_fd, serv->secret, SECRET_LENGTH) < 0) { - log_emerg("pppoe: failed to read /dev/urandom\n", strerror(errno)); + log_emerg("pppoe: failed to read /dev/urandom: %s\n", strerror(errno)); return -1; } diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index f2e9d43c..a3476c5e 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -1,3 +1,4 @@ +#include <inttypes.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> @@ -222,7 +223,7 @@ static int pptp_start_ctrl_conn_rqst(struct pptp_conn_t *conn) } if (msg->version != htons(PPTP_VERSION)) { - log_ppp_warn("PPTP version mismatch: expecting %x, received %s\n", PPTP_VERSION, msg->version); + log_ppp_warn("PPTP version mismatch: expecting %x, received %" PRIu32 "\n", PPTP_VERSION, msg->version); if (send_pptp_start_ctrl_conn_rply(conn, PPTP_CONN_RES_PROTOCOL, 0)) return -1; return 0; |