Control: tags -1 - moreinfo Control: fixed -1 4.8.0-1 Control: fixed -1 4.6.0-1
On Sat, Dec 30, 2017 at 12:17:14PM +0100, Andreas Henriksson wrote: > Control: tags -1 + unreproducible moreinfo [...] > For the record I'm testing with: > > $ dpkg -l iproute2 > Desired=Unknown/Install/Remove/Purge/Hold > | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend > |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) > ||/ Name Version Architecture Description > +++-==============-============-============-================================= > ii iproute2 4.14.1-1 amd64 networking and traffic control to [...] Looking at the git history I think this might have been fixed a while ago (or possibly even earlier, see the commit referenced in the commit below): $ git describe 74af8dd9620e v4.5.0-196-g74af8dd9 $ git show 74af8dd9620e commit 74af8dd9620e4322babf9d2a936b1d333a4e37e0 Author: Xin Long <lucien....@gmail.com> Date: Tue Jul 12 21:37:58 2016 +0800 ip route: restore route entries in correct order Sometimes we cannot restore route entries, because in kernel [1] fib_check_nh() [2] fib_valid_prefsrc() cause some routes to depend on existence of others while adding. For example, we saved all the routes, and flushed all tables [a] default via 192.168.122.1 dev eth0 [b] 192.168.122.0/24 dev eth0 src 192.168.122.21 [c] broadcast 127.0.0.0 dev lo table local src 127.0.0.1 [d] local 127.0.0.0/8 dev lo table local src 127.0.0.1 [e] local 127.0.0.1 dev lo table local src 127.0.0.1 [f] broadcast 127.255.255.255 dev lo table local src 127.0.0.1 [g] broadcast 192.168.122.0 dev eth0 table local src 192.168.122.21 [h] local 192.168.122.21 dev eth0 table local src 192.168.122.21 [i] broadcast 192.168.122.255 dev eth0 table local src 192.168.122.21 Now start to restore them: If we want to add [a], we have to add [b] first, as [1] and 'via 192.168.122.1' in [a]. If we want to add [b], we have to add [h] first, as [2] and 'src 192.168.122.21' in [b]. So the correct order to restore should be like: [e][h] -> [b][c][d][f][g][i] -> [a] This patch fixes it by traversing the file 3 times, it only restores part of them in each run according to the following conditions, to make sure every entry can be restored successfully. 1. !gw && (!fib_prefsrc || fib_prefsrc == cfg->fc_dst) 2. !gw && (fib_prefsrc != cfg->fc_dst) 3. gw Signed-off-by: Xin Long <lucien....@gmail.com> Acked-by: Phil Sutter <p...@nwl.cc> See also later fix: $ git describe c85703bb9fb778ca94a3f84343406a251d23f9ba v4.7.0-44-gc85703bb Regards, Andreas Henriksson