From 8c5a974230da98594d3f340a36ad3e3520402375 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 2 Oct 2014 17:07:02 +0200 Subject: check-new-if: don't insert before interface "lo" In kernel 3.10, "lo" appears after eth*, which causes new eth interfaces to be inserted before lo in the configuration. The script needs to be rewritten for parsing config.rc *before* parsing /proc/net/dev, so that for each interface found there, we know whether it's already known or if it appears after one which is already known. This would cause less reordering. For now, the workaround consists in refusing to insert a new interface before "lo". --- check-new-if | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-new-if b/check-new-if index bc10b62..93f883a 100755 --- a/check-new-if +++ b/check-new-if @@ -62,7 +62,7 @@ awk -v f=/etc/config.rc '\ } # we may have to insert other interfaces before this one - if (new && inside && prv[cur] != "") + if (new && inside && cur != "lo" && prv[cur] != "") insert_if(prv[cur]); if (new && inside && cur != "") { -- 1.7.12.1