From 6168660986a1bb374c6d0d690db47cb85cd7172b Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 23 Oct 2019 18:27:24 +0200 Subject: ss7: Fix finding asp by socket addr if local ip addr is 0.0.0.0 Fixes: 80b135581909fef595d48436ab04dbcb147e3895 Change-Id: I319e4983b35f63846ed7e8bfa8e8e3688c5d16e6 --- src/osmo_ss7.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 5da0da8..8a86af1 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1167,7 +1167,8 @@ osmo_ss7_asp_find_by_socket_addr(int fd) continue; for (i = 0; i < asp->cfg.local.host_cnt; i++) { - if (!asp->cfg.local.host[i] || !strcmp(asp->cfg.local.host[i], hostbuf_l)) + bool is_any = !asp->cfg.local.host[i] || !strcmp(asp->cfg.local.host[i], "0.0.0.0"); + if (is_any || !strcmp(asp->cfg.local.host[i], hostbuf_l)) break; } if (i == asp->cfg.local.host_cnt) -- cgit v1.2.3