svn commit: r350497 - head/sys/net
Ed Maste
emaste at FreeBSD.org
Thu Aug 1 13:42:59 UTC 2019
Author: emaste
Date: Thu Aug 1 13:42:58 2019
New Revision: 350497
URL: https://svnweb.freebsd.org/changeset/base/350497
Log:
ppp: correct echo-req magic number on big endian archs
The magic number is a 32-bit quantity; use uint32_t to match hton's
return type and avoid sending zeros (upper 32 bits) on big-endian
architectures.
PR: 184141
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/net/if_spppsubr.c
Modified: head/sys/net/if_spppsubr.c
==============================================================================
--- head/sys/net/if_spppsubr.c Thu Aug 1 06:35:33 2019 (r350496)
+++ head/sys/net/if_spppsubr.c Thu Aug 1 13:42:58 2019 (r350497)
@@ -4803,7 +4803,7 @@ sppp_keepalive(void *dummy)
sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ,
++sp->pp_seq[IDX_LCP], sp->pp_rseq[IDX_LCP]);
else if (sp->pp_phase >= PHASE_AUTHENTICATE) {
- long nmagic = htonl (sp->lcp.magic);
+ uint32_t nmagic = htonl(sp->lcp.magic);
sp->lcp.echoid = ++sp->pp_seq[IDX_LCP];
sppp_cp_send (sp, PPP_LCP, ECHO_REQ,
sp->lcp.echoid, 4, &nmagic);
More information about the svn-src-all
mailing list