]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_evpn.c
bgpd: update auto route target for l3vni appropriately
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 17 Aug 2021 12:42:30 +0000 (14:42 +0200)
committermergify-bot <noreply@mergify.io>
Thu, 2 Sep 2021 19:34:56 +0000 (19:34 +0000)
commit4204021e46dec75b09cbbcdcdfa2fe163fa00f34
treea3ff196abdf8bb97ccadc8850d41b3c0f6938347
parent3cb67fef98c9869a2d2f3bf1be86c3b29cb0405e
bgpd: update auto route target for l3vni appropriately

The BGP configuration for BGP EVPN RT5 setup consists in mainly
2 bgp instances (eventually one is enough) and L3VNI config.

When L3VNI is configured before BGP instances, and BGP route
targets are auto derived as per rfc8365, then, the obtained
route targets are wrong. For instance, the following can be
obtained:

=> show bgp vrf cust1 vni
BGP VRF: cust1
  Local-Ip: 10.209.36.1
  L3-VNI: 1000
  Rmac: da:85:42:ba:2a:e9
  VNI Filter: none
  L2-VNI List:

  Export-RTs:
    RT:12757:1000
  Import-RTs:
    RT:12757:1000
  RD: 65000:1000

whereas the derived route targets should be the below
ones:

=> show bgp vrf cust1 vni
BGP VRF: cust1
  Local-Ip: 10.209.36.1
  L3-VNI: 1000
  Rmac: 72:f3:af:a0:98:80
  VNI Filter: none
  L2-VNI List:

  Export-RTs:
    RT:12757:268436456
  Import-RTs:
    RT:12757:268436456
  RD: 65000:1000

There is an update handler that updates appropriately L2VNIs.
But this is not the case for L3VNIs. Add the missing code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_evpn.c