Skip to content

Commit

Permalink
Fix policy routing design bug. Local routes table should be always ev…
Browse files Browse the repository at this point in the history
…aluated before the OLSR table. If you dont do so you might lose connectivity to networks local to the routers, if any other prefix (even less specific) matches the local network of the router. This is known in Ninux as the "Viterbo bug". Reported to Ninux mailing list by Lorenzo @ TuLUG
  • Loading branch information
zioproto committed Mar 22, 2013
1 parent 04aa982 commit 36c5304
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package/ubnt-base-files/files/ninux
Expand Up @@ -33,6 +33,14 @@ elif [ -e /olsrd6.conf ]; then
olsrd -f /olsrd6.conf -d 0
fi

#Copy local routes only from table main 254 to table 110
ip route show table 254 | grep -Ev ^default | grep -Ev ^blackhole | while read ROUTE ; do
ip route add table 110 $ROUTE
done

#First evaluate local routes
ip rule add from all lookup 110 pref 3

#Private routes to OLSR table
ip rule add to 10.0.0.0/8 table 111 pref 4
ip rule add to 172.16.0.0/12 table 111 pref 4
Expand Down

0 comments on commit 36c5304

Please sign in to comment.