The source address configuration in BGP added.
This commit is contained in:
parent
a456788bce
commit
85ae398a61
1 changed files with 6 additions and 1 deletions
|
@ -576,7 +576,12 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p
|
||||||
if (p->cf->next_hop_self ||
|
if (p->cf->next_hop_self ||
|
||||||
!p->is_internal ||
|
!p->is_internal ||
|
||||||
rta->dest != RTD_ROUTER)
|
rta->dest != RTD_ROUTER)
|
||||||
|
{
|
||||||
|
if (ipa_nonzero(p->cf->source_addr))
|
||||||
|
*(ip_addr *)z = p->cf->source_addr;
|
||||||
|
else
|
||||||
*(ip_addr *)z = p->local_addr;
|
*(ip_addr *)z = p->local_addr;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
*(ip_addr *)z = e->attrs->gw;
|
*(ip_addr *)z = e->attrs->gw;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue