Merge pull request #9614 from idryzhov/bgp-aspath-coverity

bgpd: fix coverity warning
This commit is contained in:
Donatas Abraitis 2021-09-16 15:03:25 +03:00 committed by GitHub
commit a8f67b1306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -798,6 +798,9 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
bgp_attr_default_set(&attr, BGP_ORIGIN_IGP);
/* make coverity happy */
assert(attr.aspath);
attr.local_pref = bgp->default_local_pref;
if ((afi == AFI_IP6) || peer_cap_enhe(peer, afi, safi)) {