MT#55283 call: add a socket family guard

16de9688d6 resets the `socket.family` to NULL,
that makes the direct appeal to the corresponding
object unsafe.

E.g. `ps->selected_sfd->socket.family->name` when
filling the streams.

Add a simply guard and log `none` in case
the ip family is NULL.

Change-Id: I7ad7399e32e5d0ffb2fcc919822d05760fdc7421
(cherry picked from commit 05817bad13)
mr26.1
Donat Zenichev 3 weeks ago
parent 94b3d7f2db
commit 5937851296

@ -1036,9 +1036,14 @@ static void __fill_stream(struct packet_stream *ps, const struct endpoint *epp,
&& ep.address.family != ps->selected_sfd->socket.family)
{
if (ep.address.family && !is_trickle_ice_address(&ep))
{
const char *socket_family = ps->selected_sfd->socket.family
? ps->selected_sfd->socket.family->name : "none";
ilog(LOG_WARN, "Ignoring updated remote endpoint %s%s%s as the local "
"socket is %s", FMT_M(endpoint_print_buf(&ep)),
ps->selected_sfd->socket.family->name);
socket_family);
}
return;
}

Loading…
Cancel
Save