summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 15:53:54 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 15:53:54 +0200
commit0aa335a1c7826ae97e66494b08c914d31a9f870f (patch)
treeb3ab4a8cf3c6ead59296d03c8f9cd28f96206f34 /src/protocol_ec25519_fhmqvc.c
parent01196a23874f5e826b0fd3641aac6b85ede32fa5 (diff)
downloadfastd-0aa335a1c7826ae97e66494b08c914d31a9f870f.tar
fastd-0aa335a1c7826ae97e66494b08c914d31a9f870f.zip
Remove handing for packets received on wrong sockets (this shouldn't happen)
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r--src/protocol_ec25519_fhmqvc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c
index 9e7174b..87eedef 100644
--- a/src/protocol_ec25519_fhmqvc.c
+++ b/src/protocol_ec25519_fhmqvc.c
@@ -569,16 +569,8 @@ static fastd_peer_t* find_sender_key(fastd_context_t *ctx, const fastd_peer_addr
static fastd_peer_t* match_sender_key(fastd_context_t *ctx, const fastd_socket_t *sock, const fastd_peer_address_t *address, fastd_peer_t *peer, const unsigned char key[32]) {
errno = 0;
- if (sock->peer) {
- if (peer != sock->peer) {
- if (peer && !fastd_peer_is_floating(peer) && !fastd_peer_is_dynamic(peer)) {
- errno = EPERM;
- return NULL;
- }
-
- peer = sock->peer;
- }
- }
+ if (sock->peer && peer != sock->peer)
+ exit_bug(ctx, "packet without correct peer set on dynamic socket");
if (peer) {
if (memcmp(peer->protocol_config->public_key.p, key, PUBLICKEYBYTES) == 0) {