summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-10-26 19:26:06 +0200
committerSander Vrijders <[email protected]>2016-10-26 19:26:06 +0200
commit0276dbc1a8b09217f0552521cf2e7d9056a8d2a3 (patch)
treea61eb36094606309f31fbd81d61e1ef5361dc393 /src/ipcpd/shim-udp
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.
Diffstat (limited to 'src/ipcpd/shim-udp')
-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;