diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-06-13 06:58:21 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-06-13 06:58:21 +0000 |
commit | d3889080eb68e1f605dce973cefcdbc98a9bfb43 (patch) | |
tree | 729e589e1a4d65bb12a5702bb43e0a0b34d73829 /sbin/ifconfig | |
parent | 954951c0b50bdd594e3210a3e7648063435d6860 (diff) |
INADDR_PFSYNC_GROUP is defined as network byte order in the kernel but
as host byte order in userland. ifconfig didn't get this and always printed
the pfsync syncpeer on little endian machines because the check to prevent
printing the default address assumed the wrong byte order.
ok claudio@ rainer@
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 51806c9d689..a3b8995236b 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.197 2008/05/06 13:33:50 pyr Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.198 2008/06/13 06:58:20 reyk Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -3580,7 +3580,7 @@ pfsync_status(void) if (preq.pfsyncr_syncdev[0] != '\0') { printf("\tpfsync: 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)); printf("maxupd: %d\n", preq.pfsyncr_maxupdates); |