Bug #2758
closed
Old configuration remains when changing interface type
Added by Renato Botelho almost 12 years ago.
Updated almost 12 years ago.
Affected Architecture:
All
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
- Affected Version changed from 2.1 to 2.0.x
- Assignee set to Ermal Luçi
- Status changed from New to Feedback
- % Done changed from 0 to 100
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
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.
This new version of the patch is working fine for all tests I've made here.
- Status changed from New to Feedback
- % Done changed from 50 to 100
- Status changed from Feedback to Resolved
Also available in: Atom
PDF