Browse Source

Add warning when community and encryption keys match

pull/149/head
emanuele-f 5 years ago
parent
commit
32f757922c
  1. 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…
Cancel
Save