Project

General

Profile

Actions

Bug #2758

closed

Old configuration remains when changing interface type

Added by Renato Botelho almost 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ermal Luçi
Category:
Interfaces
Target version:
Start date:
01/16/2013
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0.x
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

patch-partial-bug-2758.diff (2.45 KB) patch-partial-bug-2758.diff Partial implementation of the fix Renato Botelho, 01/31/2013 01:53 PM
fix_2758.diff (2.61 KB) fix_2758.diff Renato Botelho, 02/19/2013 12:35 PM
Actions #1

Updated by Renato Botelho almost 12 years ago

  • Affected Version changed from 2.1 to 2.0.x
Actions #2

Updated by Renato Botelho almost 12 years ago

  • Assignee set to Ermal Luçi
Actions #3

Updated by Ermal Luçi almost 12 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

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

Actions #5

Updated by Renato Botelho almost 12 years ago

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.

Actions #6

Updated by Renato Botelho almost 12 years ago

This new version of the patch is working fine for all tests I've made here.

Actions #7

Updated by Renato Botelho almost 12 years ago

  • Status changed from New to Feedback
  • % Done changed from 50 to 100
Actions #8

Updated by Renato Botelho almost 12 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF