Skip to content

Commit

Permalink
Merge pull request #1415 from jasonlyc/bug_fix
Browse files Browse the repository at this point in the history
stop dhcpv6 client and remove lease file when pppoe interface is deleted
  • Loading branch information
MelvinTo authored Dec 2, 2024
2 parents 72eed73 + 8372e2e commit 78105b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/interface/pppoe_intf_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class PPPoEInterfacePlugin extends InterfaceBasePlugin {
if (!af) {
await exec(`sudo systemctl stop firerouter_pppd@${this.name}`).catch((err) => {});
await exec(`rm -f ${this._getConfFilePath()}`).catch((err) => {});
// make sure to stop dhcpv6 client no matter if dhcp6 is enabled
await exec(`sudo systemctl stop firerouter_dhcpcd6@${this.name}`).catch((err) => {});
// remove dhcpcd lease file to ensure it will trigger PD_CHANGE event when it is re-applied
const lease6Filename = await this._getDHCPCDLease6Filename();
if (lease6Filename)
await exec(`sudo rm -f ${lease6Filename}`).catch((err) => {});
} else
await super.flushIP(af);
}
Expand Down

0 comments on commit 78105b8

Please sign in to comment.