Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change

Started by schnipp, May 25, 2018, 04:42:23 PM

Previous topic - Next topic
Quote from: glasi on October 09, 2021, 08:04:29 PM
During my testing I've experienced one unsightly issue. States won't be killed when the files with the cached IP addresses are deleted from /var/db. Now one might wonder if that can happen. Unfortunately, the answer is yes. The files will be deleted once the pppoe interface will be removed (maybe due to pulling out the WAN network cable or when clicking pppoe disconnect in the GUI).

For that reason I would like to suggest, that the cache files should remain untouched when the pppoe interface will be removed.

Anyone having a clue which script or code snippet deletes the IP cache files when the (pppoe) interface is removed?



I digged a bit further.

States on the PPPoE interface won't be deleted by interface_bring_down() function for two reasons:


  • PPPoE interface will be deleted when killing mpd5. Hence, if (does_interface_exist($realif)) in interface_bring_down() function will always return false and $pfctlflush array will remain empty.

  • Even if the PPPoE interface still would be alive, state killing would not succeed as states by default are floating (i. e. not bound to interfaces). Hence, state killing command mwexecf('/sbin/pfctl -i %s -Fs', $dev); in interface_bring_down() function won't delete any states at all.

    That no states are bound to the PPPoE interface can be easily verified with the following command:

    pfctl -i pppoe0 -s states

Houston, we have a problem, do we?

What I don't understand is why one would like to kill mpd5 process in this situation.