Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2019 20:33:35 +0000 (UTC)
From:      Alan Somers <asomers@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: r344138 - stable/12/sbin/ifconfig
Message-ID:  <201902142033.x1EKXZqw085482@repo.freebsd.org>

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



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