mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
Add warning when community and encryption keys match
This commit is contained in:
parent
65c81612ca
commit
32f757922c
3
edge.c
3
edge.c
|
@ -649,6 +649,9 @@ int main(int argc, char* argv[]) {
|
||||||
if(tuntap_open(&tuntap, ec.tuntap_dev_name, ec.ip_mode, ec.ip_addr, ec.netmask, ec.device_mac, ec.mtu) < 0)
|
if(tuntap_open(&tuntap, ec.tuntap_dev_name, ec.ip_mode, ec.ip_addr, ec.netmask, ec.device_mac, ec.mtu) < 0)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
|
if(conf.encrypt_key && !strcmp((char*)conf.community_name, conf.encrypt_key))
|
||||||
|
traceEvent(TRACE_WARNING, "Community and encryption key must differ, otherwise security will be compromised");
|
||||||
|
|
||||||
if((eee = edge_init(&tuntap, &conf, &rc)) == NULL) {
|
if((eee = edge_init(&tuntap, &conf, &rc)) == NULL) {
|
||||||
traceEvent(TRACE_ERROR, "Failed in edge_init");
|
traceEvent(TRACE_ERROR, "Failed in edge_init");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user