• Léo-Paul Géneau's avatar
    Fix: properly remove interfaces on stop command · 0406dea3
    Léo-Paul Géneau authored
    On stop command call Main.stop() runs
    `remove_interface("*", pim=True, membership=True, ipv4=True, ipv6=True)`.
    
    Therefore if a PIM interface was added for network interface eth0, the call
    `remove_interface('eth0', True, True)` will evaluate the condition
    `membership and not membership_interface` as True and the PIM interface will
    never be removed.
    
    Furthermore
    `remove_interface("*", pim=True, membership=True, ipv4=True, ipv6=True)` will
    do calls like `remove_interface('lo', True, True)` then calling
    `remove_virtual_interface('lo')` and the line
    `index = self.vif_name_to_index_dic.pop(interface_name, None)` will cause a
    KeyError when running
    `del self.vif_name_to_index_dic[self.vif_index_to_name_dic[index]]` or
    `mif_index = self.vif_name_to_index_dic.pop(interface_name)`.
    0406dea3
Kernel.py 33 KB