X-Git-Url: http://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_edge.c;h=a1cf640973a697d0e6709a88d2415edcb3c59170;hp=be48e0d4bb470aefbcb9589784b443b634cc1c7a;hb=d3297fbd3b8c8c8a4661f5bbf89aca5cacba8b5a;hpb=49b4cd84ba6c33c6dfde0ef0ac978e5004273f56 diff --git a/src/protocol_edge.c b/src/protocol_edge.c index be48e0d4..a1cf6409 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -70,7 +70,7 @@ bool add_edge_h(connection_t *c) { /* Check if names are valid */ - if(!check_id(from_name) || !check_id(to_name)) { + if(!check_id(from_name) || !check_id(to_name) || !strcmp(from_name, to_name)) { logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_EDGE", c->name, c->hostname, "invalid name"); return false; @@ -197,7 +197,7 @@ bool del_edge_h(connection_t *c) { /* Check if names are valid */ - if(!check_id(from_name) || !check_id(to_name)) { + if(!check_id(from_name) || !check_id(to_name) || !strcmp(from_name, to_name)) { logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_EDGE", c->name, c->hostname, "invalid name"); return false;