mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 04:43:32 +00:00
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>
This commit is contained in:
parent
e03e5bb758
commit
fe9140c204
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7740
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user