projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7398002
)
- Hit people who can't figure out subnet address/mask pairs with a
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 29 Oct 2000 00:46:43 +0000
(
00:46
+0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 29 Oct 2000 00:46:43 +0000
(
00:46
+0000)
(clue)bat.
src/net.c
patch
|
blob
|
history
diff --git
a/src/net.c
b/src/net.c
index
8b243a5
..
32c66e8
100644
(file)
--- a/
src/net.c
+++ b/
src/net.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: net.c,v 1.35.4.5
0 2000/10/29 00:02:18
guus Exp $
+ $Id: net.c,v 1.35.4.5
1 2000/10/29 00:46:43
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-738,6
+738,14
@@
cp
net->net.ipv4.address = cfg->data.ip->address;
net->net.ipv4.mask = cfg->data.ip->mask;
net->net.ipv4.address = cfg->data.ip->address;
net->net.ipv4.mask = cfg->data.ip->mask;
+ /* Teach newbies what subnets are... */
+
+ if((net->net.ipv4.address & net->net.ipv4.mask) != net->net.ipv4.address)
+ {
+ syslog(LOG_ERR, _("Network address and subnet mask do not match!"));
+ return -1;
+ }
+
subnet_add(myself, net);
}
subnet_add(myself, net);
}