]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: vpn-vrf routemaps: no leak if named route-map not defined 2083/head
authorG. Paul Ziemba <paulz@labn.net>
Wed, 18 Apr 2018 05:30:38 +0000 (22:30 -0700)
committerG. Paul Ziemba <paulz@labn.net>
Wed, 18 Apr 2018 05:42:39 +0000 (22:42 -0700)
commitd92a55dfb665426b07e042dbe206eb0d6b2418a4
tree535f797a5b41e4c62d7165997ed14e747727ab10
parente49b64dee719b86b4844f0e3868b0f0bb6469e4d
bgpd: vpn-vrf routemaps: no leak if named route-map not defined

given a configuration such as this:

    router bgp 7777 vrf A
address-family ipv4 unicast
    route-map vpn import FOO
    import vpn

or this:

    router bgp 7777 vrf A
address-family ipv4 unicast
    rd vpn export 1:3
    rt vpn export 1:100
    route-map vpn export FOO
    export vpn

Previous code allowed leaking if the named FOO route-map was not defined.

Since the configuration is logically incomplete, if a route-map is named
for "vpn export" or "vpn import" but is not defined, leaking should not
occur until the route-map is defined.

This changeset implements the correct behavior.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h