summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/peer.c b/src/peer.c
index e2ddf22..9acedcb 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -169,6 +169,11 @@ static bool has_group_config_constraints(const fastd_peer_group_config *group) {
}
void fastd_peer_reset_socket(fastd_context *ctx, fastd_peer *peer) {
+ if (peer->address.sa.sa_family == AF_UNSPEC) {
+ free_socket(ctx, peer);
+ return;
+ }
+
if (!fastd_peer_is_socket_dynamic(peer))
return;