From fe9140c204d27ed95ce7b70edbc5814f6ca72fe6 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Mon, 10 Apr 1995 18:42:10 +0000 Subject: [PATCH] there is a endian problem when setting up tunnel and phyint boundaries in the mrouted. inet_parse returns network byte ordered address, but there are a couple comaprisons that need to be done on the addresses and the comparisons are done in host order. I left the comparisions for 0xffffffff alone, because this value is the same in network and host orders. Submitted by: Mark Tinguely --- usr.sbin/mrouted/config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mrouted/config.c b/usr.sbin/mrouted/config.c index c7aa7b003bdf..75e4b6a3a392 100644 --- a/usr.sbin/mrouted/config.c +++ b/usr.sbin/mrouted/config.c @@ -7,7 +7,7 @@ * Leland Stanford Junior University. * * - * $Id: config.c,v 1.6 1994/08/24 23:52:54 thyagara Exp $ + * $Id: config.c,v 1.2 1994/09/08 02:51:12 wollman Exp $ */ @@ -298,7 +298,7 @@ void config_vifs_from_file() } if ((baddr = inet_parse(s1)) == 0xffffffff || - (baddr & 0xff000000) != 0xef000000) { + (ntohl(baddr) & 0xff000000) != 0xef000000) { log(LOG_ERR, 0, "incorrect boundary address %s in %s", s1, configfilename); @@ -462,7 +462,7 @@ void config_vifs_from_file() } if ((baddr = inet_parse(s1)) == 0xffffffff || - (baddr & 0xef000000) != 0xef000000) { + (ntohl(baddr) & 0xef000000) != 0xef000000) { log(LOG_ERR, 0, "incorrect boundary address %s in %s", s1, configfilename); @@ -703,7 +703,7 @@ void config_vifs_from_file() } if ((baddr = inet_parse(s1)) == 0xffffffff || - (baddr & 0xef000000) != 0xef000000) { + (ntohl(baddr) & 0xef000000) != 0xef000000) { log(LOG_ERR, 0, "incorrect address %s for tunnel to %s in %s", s1, inet_fmt(rmt_addr, s1), configfilename);