svn commit: r344138 - stable/12/sbin/ifconfig

Alan Somers asomers at FreeBSD.org
Thu Feb 14 20:33:36 UTC 2019


Author: asomers
Date: Thu Feb 14 20:33:35 2019
New Revision: 344138
URL: https://svnweb.freebsd.org/changeset/base/344138

Log:
  MFC r343530:
  
  ifconfig: fix endianness bug displaying pfsync interfaces
  
  Reviewed by:	kp
  Differential Revision:	https://reviews.freebsd.org/D19005

Modified:
  stable/12/sbin/ifconfig/ifpfsync.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/ifconfig/ifpfsync.c
==============================================================================
--- stable/12/sbin/ifconfig/ifpfsync.c	Thu Feb 14 20:31:05 2019	(r344137)
+++ stable/12/sbin/ifconfig/ifpfsync.c	Thu Feb 14 20:33:35 2019	(r344138)
@@ -195,16 +195,16 @@ pfsync_status(int s)
 		return;
 
 	if (preq.pfsyncr_syncdev[0] != '\0' ||
-	    preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP)
+	    preq.pfsyncr_syncpeer.s_addr != htonl(INADDR_PFSYNC_GROUP))
 			printf("\t");
 
 	if (preq.pfsyncr_syncdev[0] != '\0')
 		printf("pfsync: syncdev: %s ", preq.pfsyncr_syncdev);
-	if (preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP)
+	if (preq.pfsyncr_syncpeer.s_addr != htonl(INADDR_PFSYNC_GROUP))
 		printf("syncpeer: %s ", inet_ntoa(preq.pfsyncr_syncpeer));
 
 	if (preq.pfsyncr_syncdev[0] != '\0' ||
-	    preq.pfsyncr_syncpeer.s_addr != INADDR_PFSYNC_GROUP) {
+	    preq.pfsyncr_syncpeer.s_addr != htonl(INADDR_PFSYNC_GROUP)) {
 		printf("maxupd: %d ", preq.pfsyncr_maxupdates);
 		printf("defer: %s\n", preq.pfsyncr_defer ? "on" : "off");
 	}


More information about the svn-src-all mailing list