diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 15:53:54 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 15:53:54 +0200 |
commit | 0aa335a1c7826ae97e66494b08c914d31a9f870f (patch) | |
tree | b3ab4a8cf3c6ead59296d03c8f9cd28f96206f34 /src/fastd.c | |
parent | 01196a23874f5e826b0fd3641aac6b85ede32fa5 (diff) | |
download | fastd-0aa335a1c7826ae97e66494b08c914d31a9f870f.tar fastd-0aa335a1c7826ae97e66494b08c914d31a9f870f.zip |
Remove handing for packets received on wrong sockets (this shouldn't happen)
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fastd.c b/src/fastd.c index 6cfa442..fa6ea65 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -981,9 +981,12 @@ static inline void handle_socket_receive(fastd_context_t *ctx, fastd_socket_t *s fastd_peer_t *peer = NULL; if (sock->peer) { - if (fastd_peer_address_equal(&sock->peer->address, remote_addr)) { - peer = sock->peer; + if (!fastd_peer_address_equal(&sock->peer->address, remote_addr)) { + fastd_buffer_free(buffer); + return; } + + peer = sock->peer; } else { for (peer = ctx->peers; peer; peer = peer->next) { |