Date: Wed, 14 Aug 2019 13:14:48 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351025 - stable/12/sys/net Message-ID: <201908141314.x7EDEmH1014056@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Aug 14 13:14:47 2019 New Revision: 351025 URL: https://svnweb.freebsd.org/changeset/base/351025 Log: MFC r350497: 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 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/net/if_spppsubr.c Modified: stable/12/sys/net/if_spppsubr.c ============================================================================== --- stable/12/sys/net/if_spppsubr.c Wed Aug 14 09:56:58 2019 (r351024) +++ stable/12/sys/net/if_spppsubr.c Wed Aug 14 13:14:47 2019 (r351025) @@ -4807,7 +4807,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?201908141314.x7EDEmH1014056>