]> git.puffer.fish Git - matthieu/frr.git/commitdiff
staticd: To set the default value of blackhole type correctly
authorvdhingra <vdhingra@vmware.com>
Fri, 9 Oct 2020 16:23:14 +0000 (09:23 -0700)
committervdhingra <vdhingra@vmware.com>
Fri, 9 Oct 2020 16:35:56 +0000 (09:35 -0700)
When nexthop is allocated, default value of blockhole type
was not getting set, this leads to below problem. The default
value should be in-sync with the deafult value in yang model.

c t
ip route 131.1.1.0/24 Null0

do show running-config
...
!
ip route 131.1.1.0/24 blackhole
!
end

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
staticd/static_routes.c

index d6aab296c950f52346a25dbbbbd75b87b22f1ac7..d105b2123f31ad9216acfe6a5626b6f37ce068a2 100644 (file)
@@ -283,6 +283,7 @@ static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
 
                break;
        case STATIC_BLACKHOLE:
+               nh->bh_type = STATIC_BLACKHOLE_NULL;
                break;
        case STATIC_IFNAME:
                ifp = if_lookup_by_name(ifname, nh_svrf->vrf->vrf_id);