Date: Thu, 1 Aug 2019 13:42:59 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350497 - head/sys/net Message-ID: <201908011342.x71DgxH7011655@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908011342.x71DgxH7011655>