OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
« previous next »
  • Print
Pages: 1 2 [3]

Author Topic: Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change  (Read 16263 times)

glasi

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 9
    • View Profile
Re: Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
« Reply #30 on: October 18, 2021, 09:04:12 pm »
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?
Logged

Fright

  • Hero Member
  • *****
  • Posts: 1777
  • Karma: 164
    • View Profile
Re: Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
« Reply #31 on: October 18, 2021, 10:05:51 pm »
@glasi
in the end of interface_bring_down() function
https://github.com/opnsense/core/blob/dfe3932166f8bf0658964f588dc4713a0678aa1b/src/etc/inc/interfaces.inc#L981
Logged

glasi

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 9
    • View Profile
Re: Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
« Reply #32 on: October 19, 2021, 06:08:30 pm »
Thanks. I'll have a look.
Logged

glasi

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 9
    • View Profile
Re: Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
« Reply #33 on: October 19, 2021, 09:02:32 pm »
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.
« Last Edit: October 19, 2021, 09:06:33 pm by glasi »
Logged

  • Print
Pages: 1 2 [3]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Fritzbox (IP-Client mode) SIP + NAT + dynamic IP Change
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2