summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ppp/ppp_lcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c
index 1f20abc8..1d23ac6b 100644
--- a/accel-pppd/ppp/ppp_lcp.c
+++ b/accel-pppd/ppp/ppp_lcp.c
@@ -592,13 +592,13 @@ static void lcp_recv_echo_repl(struct ppp_lcp_t *lcp, uint8_t *data, int size)
static void send_echo_reply(struct ppp_lcp_t *lcp)
{
struct lcp_hdr_t *hdr = (struct lcp_hdr_t*)lcp->ppp->buf;
- uint32_t magic = *(uint32_t *)(hdr + 1);
+ //uint32_t magic = *(uint32_t *)(hdr + 1);
hdr->code = ECHOREP;
- *(uint32_t *)(hdr + 1) = lcp->magic;
+ *(uint32_t *)(hdr + 1) = htonl(lcp->magic);
if (conf_ppp_verbose)
- log_ppp_debug("send [LCP EchoRep id=%x <magic %x>]\n", hdr->id, magic);
+ log_ppp_debug("send [LCP EchoRep id=%x <magic %x>]\n", hdr->id, htonl(lcp->magic));
ppp_chan_send(lcp->ppp, hdr, ntohs(hdr->len) + 2);
}