mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
lwip_socket_drop_registered_mld6_memberships: Fix if_idx got lost :-(
This commit is contained in:
parent
6082251854
commit
fa51a7225a
@ -3693,12 +3693,16 @@ lwip_socket_drop_registered_mld6_memberships(int s)
|
|||||||
for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) {
|
for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) {
|
||||||
if (socket_ipv6_multicast_memberships[i].sock == sock) {
|
if (socket_ipv6_multicast_memberships[i].sock == sock) {
|
||||||
ip_addr_t multi_addr;
|
ip_addr_t multi_addr;
|
||||||
|
u8_t if_idx;
|
||||||
|
|
||||||
ip_addr_copy_from_ip6(multi_addr, socket_ipv6_multicast_memberships[i].multi_addr);
|
ip_addr_copy_from_ip6(multi_addr, socket_ipv6_multicast_memberships[i].multi_addr);
|
||||||
|
if_idx = socket_ipv6_multicast_memberships[i].if_idx;
|
||||||
|
|
||||||
socket_ipv6_multicast_memberships[i].sock = NULL;
|
socket_ipv6_multicast_memberships[i].sock = NULL;
|
||||||
socket_ipv6_multicast_memberships[i].if_idx = NETIF_NO_INDEX;
|
socket_ipv6_multicast_memberships[i].if_idx = NETIF_NO_INDEX;
|
||||||
ip6_addr_set_zero(&socket_ipv6_multicast_memberships[i].multi_addr);
|
ip6_addr_set_zero(&socket_ipv6_multicast_memberships[i].multi_addr);
|
||||||
netconn_join_leave_group_netif(sock->conn, &multi_addr, socket_ipv6_multicast_memberships[i].if_idx, NETCONN_LEAVE);
|
|
||||||
|
netconn_join_leave_group_netif(sock->conn, &multi_addr, if_idx, NETCONN_LEAVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done_socket(sock);
|
done_socket(sock);
|
||||||
|
Loading…
Reference in New Issue
Block a user