From 2c2977c2036b3b0e80a71337f2bdee5a14ac2823 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Wed, 19 Mar 2014 21:46:32 +0400 Subject: ppp: fixed magic endianness --- accel-pppd/ppp/ppp_lcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ppp/ppp_lcp.c') diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c index 12ec24ba..5975d5db 100644 --- a/accel-pppd/ppp/ppp_lcp.c +++ b/accel-pppd/ppp/ppp_lcp.c @@ -604,7 +604,7 @@ static void lcp_recv_echo_repl(struct ppp_lcp_t *lcp, uint8_t *data, int size) if (conf_ppp_verbose) log_ppp_debug("recv [LCP EchoRep id=%x]\n", lcp->fsm.recv_id); } else { - magic = *(uint32_t *)data; + magic = ntohl(*(uint32_t *)data); if (conf_ppp_verbose) log_ppp_debug("recv [LCP EchoRep id=%x ]\n", lcp->fsm.recv_id, magic); @@ -651,7 +651,7 @@ static void send_echo_request(struct triton_timer_t *t) .hdr.code = ECHOREQ, .hdr.id = lcp->fsm.id++, .hdr.len = htons(8), - .magic = lcp->magic, + .magic = htonl(lcp->magic), }; ++lcp->echo_sent; -- cgit v1.2.3