svn commit: r343530 - head/sbin/ifconfig

Alan Somers asomers at FreeBSD.org
Mon Jan 28 18:34:05 UTC 2019


Author: asomers
Date: Mon Jan 28 18:34:04 2019
New Revision: 343530
URL: https://svnweb.freebsd.org/changeset/base/343530

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

Modified:
  head/sbin/ifconfig/ifpfsync.c

Modified: head/sbin/ifconfig/ifpfsync.c
==============================================================================
--- head/sbin/ifconfig/ifpfsync.c	Mon Jan 28 16:23:56 2019	(r343529)
+++ head/sbin/ifconfig/ifpfsync.c	Mon Jan 28 18:34:04 2019	(r343530)
@@ -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-head mailing list