]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: vpn null check 2481/head
authorpaco <paco@voltanet.io>
Mon, 18 Jun 2018 13:52:57 +0000 (15:52 +0200)
committerpaco <paco@voltanet.io>
Mon, 18 Jun 2018 13:52:57 +0000 (15:52 +0200)
Can be reproduced with following vtysh sequence (an intentionaly wrong
sequence):

['configure terminal\n router bgp 255 vrf l3vrf-6\n',
 'configure terminal\n router bgp 255 vrf l3vrf-6\nbgp router-id 10.255.255.1\n',
 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nlabel vpn export 45000\n',
 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrd vpn export 255:5\n',
 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute isis\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute ospf\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute connected\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nimport vpn\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nexport vpn\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrt vpn import 255:1\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrt vpn export 255:1\n'
]

Signed-off-by: F. Aragon <paco@voltanet.io>
bgpd/bgp_mplsvpn.c

index eef711aa59bf907b1be46e9345a9b250756753ec..28e8ceb15d3e3144258ea26c1e6dcdbe95995833 100644 (file)
@@ -1335,6 +1335,9 @@ void vpn_leak_to_vrf_update_all(struct bgp *bgp_vrf, /* to */
        struct bgp_node *prn;
        safi_t safi = SAFI_MPLS_VPN;
 
+       if (!bgp_vpn)
+               return;
+
        /*
         * Walk vpn table
         */