From 0276dbc1a8b09217f0552521cf2e7d9056a8d2a3 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 26 Oct 2016 19:26:06 +0200 Subject: ipcpd: shim-udp: Add check for directory entry A check was missing in the shim UDP if the destination was already present in the directory, in which case no further queries were needed. --- src/ipcpd/shim-udp/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index e06787ce..ba2805c5 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -941,6 +941,11 @@ static int ipcp_udp_name_query(char * name) return -1; /* -ENOTENROLLED */ } + if (ipcp_data_dir_has(ipcpi.data, name)) { + pthread_rwlock_unlock(&ipcpi.state_lock); + return 0; + } + #ifdef CONFIG_OUROBOROS_ENABLE_DNS dns_addr = udp_data.dns_addr; -- cgit v1.2.3