summaryrefslogtreecommitdiffstats
path: root/src/protocols
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-11-15 16:24:25 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-11-15 16:24:25 +0100
commit89bf354b9175794972733c0940adceb225a88728 (patch)
tree019e2d33ca88740cc13359895b8beea3893f1cc0 /src/protocols
parented121da8eb6d6d60a3fe83de41d12c7c694186cb (diff)
downloadfastd-89bf354b9175794972733c0940adceb225a88728.tar
fastd-89bf354b9175794972733c0940adceb225a88728.zip
Fix segfault when checking peer addresses
This segfault would occur when a peer with a static IP address (e.i. not a hostname resolved via DNS) is read, and any other peer after that.
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c
index 8563ba2..7c11912 100644
--- a/src/protocols/ec25519_fhmqvc/handshake.c
+++ b/src/protocols/ec25519_fhmqvc/handshake.c
@@ -456,7 +456,7 @@ static fastd_peer_t * find_key(const uint8_t key[PUBLICKEYBYTES], const fastd_pe
continue;
}
- if (fastd_peer_owns_address(peer, address)) {
+ if (address && fastd_peer_owns_address(peer, address)) {
errno = EPERM;
return NULL;
}