Bug 24558

Summary: /etc/sysconfig/network-scripts/ifup-post fails to set (and clears) routes if interface slow to come up.
Product: Mageia Reporter: Stephen Usher <steve>
Component: RPM PackagesAssignee: Base system maintainers <basesystem>
Status: NEW --- QA Contact:
Severity: major    
Priority: Normal CC: jani.valimaa, lists.jjorge, mageia, marja11, thierry.vignaud
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard: MGA6TOO
Source RPM: iniscripts-9.55-24.mga6.src.rpm CVE:
Status comment:
Attachments: Patch to fix /etc/sysconfig/network-scripts/ifup-post

Description Stephen Usher 2019-03-25 16:05:22 CET
Description of problem:

The ifup-post script fails to set the roues for an interface, and accidentally clears them instead, if the network interface being operated upon hasn't fully come up.

Recent kernel changes mean that you can't set a route on an interface which has not come up fully and so ifmetric fails and the route it was trying to add is removed, which removes all routing from the interface.

The solution is to wait until the interface has come up before running ifmetric upon it.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Have a host which has ethernet interface hardware which takes an extended period to finish initialising, such as some 10Gb interfaces.
2. Boot the machine.
3. Check the routes with 'netstat -r'
Comment 1 Stephen Usher 2019-03-25 16:07:28 CET
Created attachment 10881 [details]
Patch to fix /etc/sysconfig/network-scripts/ifup-post

Patch to fix /etc/sysconfig/network-scripts/ifup-post

It checks the output of 'ip link <interface>' to see if it's up. If not then it sleeps for 2 seconds before trying again.

Only when the interface is up doe it pass on to the first instance that ifmetric is used.
Comment 2 Marja Van Waes 2019-03-25 16:59:48 CET
Thanks, Stephen

I assume this needs to be done for cauldron (Mageia 7), too.

Assigning to the base system maintainers, CC'ing the registered initscripts maintainer.

CC: (none) => mageia, marja11
Keywords: (none) => PATCH
Version: 6 => Cauldron
Assignee: bugsquad => basesystem
Whiteboard: (none) => MGA6TOO

Comment 3 José Jorge 2019-03-25 17:36:20 CET
I have seen lots of problem with this route in Cauldron, so I volunteer to apply this patch.

But I wonder how to do, as initscripts refer to an about page is empty

# (cg) To modify/see the source, mgaconf super patch and other patches
#      please read: http://gitweb.mageia.org/software/forks/initscripts/about/
#

And I see Jani has added a patch instead of editing our software?

CC: (none) => jani.valimaa, lists.jjorge, thierry.vignaud