Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2019 13:15:38 +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-11@freebsd.org
Subject:   svn commit: r351026 - stable/11/sys/net
Message-ID:  <201908141315.x7EDFc3c014178@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908141315.x7EDFc3c014178>