diff options
author | Sander Vrijders <[email protected]> | 2016-10-26 19:26:06 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-10-26 19:26:06 +0200 |
commit | 0276dbc1a8b09217f0552521cf2e7d9056a8d2a3 (patch) | |
tree | a61eb36094606309f31fbd81d61e1ef5361dc393 | |
parent | f60e18adc78afaf4d07a10e6fe8aec3767e0ca11 (diff) | |
download | ouroboros-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.c | 5 |
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; |