diff options
author | wollman <wollman@FreeBSD.org> | 1995-04-10 18:42:10 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-04-10 18:42:10 +0000 |
commit | 6a4b8abd5d055a202d2cce97dcc67190040e5066 (patch) | |
tree | ea3244b24d32fb7580853262590595c12c67f7db /usr.sbin/mrouted | |
parent | 737b1e8264ce7dd43e08ab6e469c221cd05e9ca7 (diff) | |
download | FreeBSD-src-6a4b8abd5d055a202d2cce97dcc67190040e5066.zip FreeBSD-src-6a4b8abd5d055a202d2cce97dcc67190040e5066.tar.gz |
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 <tinguely@plains.NoDak.edu>
Diffstat (limited to 'usr.sbin/mrouted')
-rw-r--r-- | usr.sbin/mrouted/config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/mrouted/config.c b/usr.sbin/mrouted/config.c index c7aa7b0..75e4b6a 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); |