summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-26 19:26:06 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-26 19:26:06 +0200
commit0276dbc1a8b09217f0552521cf2e7d9056a8d2a3 (patch)
treea61eb36094606309f31fbd81d61e1ef5361dc393
parentf60e18adc78afaf4d07a10e6fe8aec3767e0ca11 (diff)
downloadouroboros-0276dbc1a8b09217f0552521cf2e7d9056a8d2a3.tar.gz
ouroboros-0276dbc1a8b09217f0552521cf2e7d9056a8d2a3.zip
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.
-rw-r--r--src/ipcpd/shim-udp/main.c5
1 files changed, 5 insertions, 0 deletions
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;