Kaynağa Gözat

totemudpu: Don't block local socketpair

Commit to drop packets from unlisted IPs made ifdown case not working
because msg_name is unset for socketpair.

solution is to drop packets from unlisted IPs only when bind state is
BIND_STATE_REGULAR.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
(cherry picked from commit 8b638e989c391860d0e0f8bcd83fed1ac0b50992)
Jan Friesse 4 yıl önce
ebeveyn
işleme
c5d519302c
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      exec/totemudpu.c

+ 1 - 0
exec/totemudpu.c

@@ -597,6 +597,7 @@ static int net_deliver_fn (
 	}
 
 	if (instance->totem_config->block_unlisted_ips &&
+	    instance->netif_bind_state == BIND_STATE_REGULAR &&
 	    find_member_by_sockaddr(instance, (const struct sockaddr *)&system_from) == NULL) {
 		log_printf(instance->totemudpu_log_level_debug, "Packet rejected from %s",
 		    totemip_sa_print((const struct sockaddr *)&system_from));