Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 13c1ceb

Browse files
author
Mika Tervonen
committed
Clean multicast address when interface is shutdown
1 parent 88bb7cc commit 13c1ceb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

source/NWK_INTERFACE/protocol_core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ void protocol_core_interface_info_reset(protocol_interface_info_entry_t *entry)
393393
ns_list_foreach_safe(if_address_entry_t, addr, &entry->ip_addresses) {
394394
addr_delete_entry(entry, addr);
395395
}
396+
#ifdef MULTICAST_FORWARDING
397+
ns_list_foreach_safe(if_group_fwd_entry_t, group, &entry->ip_groups_fwd) {
398+
addr_multicast_fwd_remove(entry, group->group);
399+
}
400+
#endif
396401
#ifdef HAVE_RPL
397402
/* This is done after address deletion, so RPL can act on them */
398403
rpl_control_remove_domain_from_interface(entry);

test/nanostack/unittest/stub/address_stub.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ void addr_multicast_fwd_list_delete_entry(if_group_fwd_list_t *list, if_group_fw
122122
{
123123
}
124124

125+
bool addr_multicast_fwd_remove(protocol_interface_info_entry_t *interface, const uint8_t group[16])
126+
{
127+
return address_stub.bool_value;
128+
}
129+
125130
int_fast8_t addr_policy_table_add_entry(const uint8_t *prefix, uint8_t len, uint8_t precedence, uint8_t label)
126131
{
127132
return address_stub.int8_value;

0 commit comments

Comments
 (0)