bgp: force next-hop for OVH since I just can't talk to their router 2

This commit is contained in:
Luke Granger-Brown 2022-09-04 21:10:33 +01:00
parent 2e56cddee5
commit 9752742d76

View file

@ -15,6 +15,7 @@ let
if ! (avoid_martians4()) then reject;
${if ix.remote.must_be_next_hop then "if (bgp_path.first != ${toString ix.remote.asn}) then reject;" else "# no next-hop requirement"}
${lib.concatMapStringsSep "\n" (asn: "if (bgp_path ~ [= * ${toString asn} * =]) then reject;") ix.remote.drop_asns}
if (bgp_path ~ [= * 16276 * =] && gw = 195.66.225.6) then gw = 195.66.224.220; # OVH must go via router 1; router 2 is bork.
bgp_local_pref = ${toString ix.remote.bgp_local_pref};
accept;
}
@ -25,6 +26,7 @@ let
if ! (avoid_martians6()) then reject;
${if ix.remote.must_be_next_hop then "if (bgp_path.first != ${toString ix.remote.asn}) then reject;" else "# no next-hop requirement"}
${lib.concatMapStringsSep "\n" (asn: "if (bgp_path ~ [= * ${toString asn} * =]) then reject;") ix.remote.drop_asns}
if (bgp_path ~ [= * 16276 * =] && gw = 2001:7f8:4::3f94:2) then gw = 2001:7f8:4::3f94:1; # OVH must go via router 1; router 2 is bork.
bgp_local_pref = ${toString ix.remote.bgp_local_pref};
accept;
}