svn commit: r351026 - stable/11/sys/net

Ed Maste emaste at FreeBSD.org
Wed Aug 14 13:15:39 UTC 2019


Author: emaste
Date: Wed Aug 14 13:15:38 2019
New Revision: 351026
URL: https://svnweb.freebsd.org/changeset/base/351026

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/11/sys/net/if_spppsubr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/if_spppsubr.c
==============================================================================
--- stable/11/sys/net/if_spppsubr.c	Wed Aug 14 13:14:47 2019	(r351025)
+++ stable/11/sys/net/if_spppsubr.c	Wed Aug 14 13:15:38 2019	(r351026)
@@ -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);


More information about the svn-src-all mailing list