X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/0f85bdecaba4806c0f06ee89d7ec084cc015bb19..99921507eb9b842d4f41c5516af1f455d4a49a99:/ppp.c diff --git a/ppp.c b/ppp.c index 7be79ce..4d01e90 100644 --- a/ppp.c +++ b/ppp.c @@ -1,7 +1,5 @@ // L2TPNS PPP Stuff -char const *cvs_id_ppp = "$Id: ppp.c,v 1.104 2009/12/08 14:49:28 bodea Exp $"; - #include #include #include @@ -1540,7 +1538,7 @@ void processipv6cp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l) uint8_t *o = p + 4; int length = l - 4; int gotip = 0; - uint8_t ident[8]; + uint32_t ident[2]; while (length > 2) { @@ -1552,12 +1550,12 @@ void processipv6cp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l) gotip++; // seen address if (o[1] != 10) return; - *(uint32_t *) ident = htonl(session[s].ip); - *(uint32_t *) (ident + 4) = 0; + ident[0] = htonl(session[s].ip); + ident[1] = 0; if (memcmp(o + 2, ident, sizeof(ident))) { - q = ppp_conf_nak(s, b, sizeof(b), PPPIPV6CP, &response, q, p, o, ident, sizeof(ident)); + q = ppp_conf_nak(s, b, sizeof(b), PPPIPV6CP, &response, q, p, o, (uint8_t *)ident, sizeof(ident)); if (!q) return; } @@ -2375,7 +2373,7 @@ uint8_t *makeppp(uint8_t *b, int size, uint8_t *p, int l, sessionidt s, tunnelid if ((b - start) + l > size) { - LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, (b - start) + l); + LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%ld)\n", size, (b - start) + l); return NULL; }