dtaht / babeld-hacking

The Babel routing daemon
http://www.pps.univ-paris-diderot.fr/~jch/software/babel/
MIT License
1 stars 0 forks source link

atomic updates needed #23

Open dtaht opened 6 years ago

dtaht commented 6 years ago

So I get this kind of stuff from ip -6 mon when I'm blowing things up with rtod.

dnsmasq and odhcpd light up also because they are getting all this stuff.

a replace would halve these. And I thought I'd managed to do that at some point.

Deleted fc12:a8a5:1b9d:1da1::/64 via fe80::46d9:e7ff:fe93:822e dev br-lan proto babel metric 1024 pref medium unreachable fc12:a8a5:1b9d:1da1::/64 dev lo proto babel metric 4294967295 error -113 pref medium Deleted fc12:a8a5:1b9d:1da2::/64 via fe80::46d9:e7ff:fe93:822e dev br-lan proto babel metric 1024 pref medium unreachable fc12:a8a5:1b9d:1da2::/64 dev lo proto babel metric 4294967295 error -113 pref medium

dtaht commented 6 years ago

A second bug is that we keep deleting and inserting the unreachable route.

Deleted unreachable fc12:a8a5:1b9d:92c::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:92c::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:92d::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:92d::/64 dev lo proto babel metric 1024 error -148 pref medium

dtaht commented 6 years ago

unreachable fc12:a8a5:1b9d:1a04::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a05::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a05::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a06::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a06::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a07::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a07::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a08::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a08::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a09::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a09::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a0a::/64 dev lo proto babel metric 1024 error -148 pref medium unreachable fc12:a8a5:1b9d:1a0a::/64 dev lo proto babel metric 1024 error -148 pref medium Deleted unreachable fc12:a8a5:1b9d:1a0b::/64 dev lo proto babel metric 1024 error -148 pref medium

dtaht commented 6 years ago

so this is from my current atomic branch. The modify of the /14 fails.

One of these days I'm gonna figure this one out.

route failure: modify fd89:cb20:8854::/48 from ::/0 table 254 metric 0 dev 2 nexthop fe80::46d9:e7ff:fe93:822e Modify failed, trying add route failure: add fd89:cb20:8854::/48 from ::/0 table 254 metric 0 dev 2 nexthop fe80::46d9:e7ff:fe93:822e route failure: modify 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev 2 nexthop 172.22.0.214 Modify failed, trying add route failure: add 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev 2 nexthop 172.22.0.214 route failure: modify 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev 2 nexthop 172.22.0.1 Modify failed, trying add route failure: add 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev 2 nexthop 172.22.0.1

dtaht commented 6 years ago

So I replaced kernel_netlink with the equivalent commands to see if I can fix the state machine

And I think this was finally a useful exercise.

root@dancer:~/git/babeld-atomic# ./babeld eno1
ip route add ::/0 from fde5:dfb9:df90:fff0::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add 2601:646:8500:7100::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add ::/0 from 2601:646:8500:7100::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add ::/0 from 2001:558:6045:105:f039:c605:3f8b:8605/128 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.1 proto 42
ip route add 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.1 proto 42
ip route replace ::/0 from 2001:558:6045:105:f039:c605:3f8b:8605/128 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace ::/0 from 2601:646:8500:7100::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace ::/0 from fde5:dfb9:df90:fff0::/60 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.1 proto 42
ip route replace 172.20.0.0/14 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.1 proto 42
ip route replace 2601:646:8500:7100::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route add 172.22.0.172/32 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.91 proto 42
ip route add fd89:cb20:8854::/48 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route add 172.22.220.0/22 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.91 proto 42
ip route add 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route add 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route add 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.2 proto 42
ip route replace 172.22.0.172/32 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.172 proto 42
ip route add fc49:de8f:26e2::1/128 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route add fc49:de8f:26e2::2/128 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route add fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route add fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route add fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route add fc49:de8f:26e2::/48 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2::/48 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2::/48 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable fc49:de8f:26e2::/48 from ::/0 table 254 metric 0 dev eno1 via fe80::225:90ff:fec1:6252 proto 42
ip route replace unreachable fc49:de8f:26e2:1::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable fc49:de8f:26e2:2::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable fc49:de8f:26e2::/56 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
ip route replace unreachable ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace unreachable ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace unreachable 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.2 proto 42
RTNETLINK answers: Invalid argument
ip route replace unreachable 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace unreachable 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace unreachable 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace unreachable 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.1 proto 42
ip route flush ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
RTNETLINK answers: File exists
ip route flush ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
RTNETLINK answers: File exists
ip route flush 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::e091:f5ff:febe:a353 proto 42
RTNETLINK answers: File exists
ip route flush 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
RTNETLINK answers: File exists
ip route flush 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
RTNETLINK answers: File exists
ip route flush 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route add 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::46d9:e7ff:fe93:822e proto 42
RTNETLINK answers: File exists
ip route replace ::/0 from 2603:3024:1536:8600:f6f2:6dff:feb6:a01d/128 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace ::/0 from 2603:3024:1536:86f0::/60 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f0::/60 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f0::/64 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f4::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 2603:3024:1536:86f8::/62 from ::/0 table 254 metric 0 dev eno1 via fe80::f6f2:6dff:feb6:a01c proto 42
ip route replace 0.0.0.0/0 from 0.0.0.0/0 table 254 metric 0 dev eno1 via 172.22.0.2 proto 42
dtaht commented 6 years ago

despite that looking good command wise, what it was doing was creating an unreachable and a reachable route rather than replacing one.

dtaht commented 6 years ago

gonemad So if we can cut the number of route commands down, the impact on other apps will be less.