]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Do not treat the route as martian for static BGP routes 6625/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 22 Jun 2020 13:23:24 +0000 (16:23 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 22 Jun 2020 13:23:24 +0000 (16:23 +0300)
commitb099a5c866a4387fca495b021548449e48f8db37
tree00a22af5c94c17908d4416ce15a8e2800b2c2e74
parent8803809f0b51319606b339db00684f1f0eddfc0f
bgpd: Do not treat the route as martian for static BGP routes

If we have something like:
```
ip route 1.1.1.0/24 Null0
!
router bgp 100
 no bgp ebgp-requires-policy
 neighbor 192.168.0.2 remote-as 200
 !
 address-family ipv4 unicast
  network 1.1.1.0/24
  redistribute connected
 exit-address-family
!
line vty
!
```

1.1.1.0/24 is not advertised due to martian nexthop (0.0.0.0). It starts
working only when we use `redistribute static`.

By checking if it's a BGP static route we able to announce
1.1.1.0/24 with `network 1.1.1.0/24` without redistribute even when
`bgp import-check` is enabled.

Disabling `bgp import-check` works as well, but it's enabled by default
since 7.4.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_route.c