]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: fix self type-2 routes rmac and nexhtop
authorChirag Shah <chirag@cumulusnetworks.com>
Thu, 24 Oct 2019 21:32:49 +0000 (14:32 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Fri, 22 Nov 2019 15:53:37 +0000 (07:53 -0800)
commitb96cafa338471cd9acbc9d8d20e47040e99d0ebd
tree3dfd768b1bcf39ee855b61b5b7d65c591764ba14
parent1c97c9fd23056c4c0254630c1e1b5a25ca5108e8
bgpd: fix self type-2 routes rmac and nexhtop

For self type-2 routes, do not assign system-rmac
as attribute RMAC value if advertise-pip is disable
or macvlan is not present.

Ticket:CM-26923
Reviewed By:CCR-9397
Testing Done:

pip is disabled under bgp vrf2 instance.
Trigger frr-restart.

Before fix:
*> [2]:[0]:[48]:[00:02:00:00:00:2e]:[32]:[45.0.4.4]
                    36.0.0.11                          32768 i
                    ET:8 RT:5546:1004 RT:5546:4002 Rmac:00:02:00:00:00:2e

After fix:
*> [2]:[0]:[48]:[00:02:00:00:00:2e]:[32]:[45.0.4.4]
                    36.0.0.11                          32768 i
                    ET:8 RT:5546:1004 RT:5546:4002 Rmac:44:38:39:ff:ff:01

TOR# ifquery vlan1004
auto vlan1004
iface vlan1004
        address 45.0.4.4/24
        vlan-id 1004
        vrf vrf2

VNI: 4002 (known to the kernel)
  Type: L3
  Tenant VRF: vrf2
  RD: 45.0.6.4:3
  Originator IP: 36.0.0.11
  Advertise-pip: Yes
  System-IP: 27.0.0.11
  System-MAC: 00:02:00:00:00:2e
  Router-MAC: 44:38:39:ff:ff:01

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_evpn.c