Bug #2758
closedOld configuration remains when changing interface type
100%
Description
When interface type is changed, new type is configured correctly but the old type configuration is not cleaned up.
When changing from Static IP to PPPoE, the static IP is still configured on interface.
When changing from DHCP to other type, dhclient is not killed.
When changing from any ppp type to a non-ppp one, mpd is not killed.
Files
Updated by Renato Botelho almost 12 years ago
- Affected Version changed from 2.1 to 2.0.x
Updated by Ermal Luçi almost 12 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 18f338da58e4f98478bd4710b3f4907759cd9540.
Updated by Renato Botelho almost 12 years ago
After some tests here, i noted the issue persists. When I changed interface from static to pppoe, the static IP remains in the interface, and when I changed it back, mpd5 was not killed
Updated by Renato Botelho almost 12 years ago
- File patch-partial-bug-2758.diff patch-partial-bug-2758.diff added
- Status changed from Feedback to New
- % Done changed from 100 to 50
I spent some time debugging it and noted what is happening.
1. When interface_bring_down() is called and $ifcfgo is passed to it, it just contains interfaces section of config, and not ppps sections, because of that, it cannot stop mpd when changing from PPPoE to static for example.
2. Inside interface_bring_down(), $realif is considering the current configured interface. When you are moving from static to PPPoE for example, it'll run 'ifconfig pppoe0 delete' when it should run 'ifconfig em0 delete'.
I implemented part of the fix, that saves old ppp information on .interfaces.apply, but it's still missing code to get the old $realif. Patch is attached.
Updated by Renato Botelho over 11 years ago
- File fix_2758.diff fix_2758.diff added
This new version of the patch is working fine for all tests I've made here.
Updated by Renato Botelho over 11 years ago
- Status changed from New to Feedback
- % Done changed from 50 to 100
Applied in changeset e12ad49f4621ec9e99ca829c2d7188ad456638f8.
Updated by Renato Botelho over 11 years ago
- Status changed from Feedback to Resolved