projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug where lookup_subnet_ipv4() could go into an infinite loop.
[tinc]
/
src
/
subnet.c
diff --git
a/src/subnet.c
b/src/subnet.c
index
51b1cd7
..
2e1a24a
100644
(file)
--- a/
src/subnet.c
+++ b/
src/subnet.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: subnet.c,v 1.1.2.
19 2001/06/01 08:02:09
guus Exp $
+ $Id: subnet.c,v 1.1.2.
21 2001/06/05 18:07:14
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-244,7
+244,7
@@
cp
subnet->net.ipv6.mask.x[7]);
break;
default:
subnet->net.ipv6.mask.x[7]);
break;
default:
- asprintf(&netstr, _("unknown"));
+ asprintf(&netstr, _("unknown
subnet type
"));
}
cp
return netstr;
}
cp
return netstr;
@@
-289,7
+289,7
@@
cp
/* Otherwise, see if there is a bigger enclosing subnet */
subnet.net.ipv4.mask = p->net.ipv4.mask << 1;
/* Otherwise, see if there is a bigger enclosing subnet */
subnet.net.ipv4.mask = p->net.ipv4.mask << 1;
- subnet.net.ipv4.address
&=
subnet.net.ipv4.mask;
+ subnet.net.ipv4.address
= p->net.ipv4.address &
subnet.net.ipv4.mask;
}
}
} while (p);
}
}
} while (p);