summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-03-04 12:34:42 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-03-04 12:34:42 +0300
commit2c2662e034332ed52c4a31608afab794c00a2ec9 (patch)
tree1e7d775b4b7408bdaffc84e01694e78e53403136 /accel-pppd/ppp
parentf02ea2ef3474d56814ec77a28fa1ea85c8afd31e (diff)
downloadaccel-ppp-2c2662e034332ed52c4a31608afab794c00a2ec9.tar.gz
accel-ppp-2c2662e034332ed52c4a31608afab794c00a2ec9.zip
ppp: fix incorrect magic in lcp echo reply
Diffstat (limited to 'accel-pppd/ppp')
-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);
}