Commit 85ae398a authored by Ondřej Filip's avatar Ondřej Filip

The source address configuration in BGP added.

parent a456788b
......@@ -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 ||
!p->is_internal ||
rta->dest != RTD_ROUTER)
*(ip_addr *)z = p->local_addr;
{
if (ipa_nonzero(p->cf->source_addr))
*(ip_addr *)z = p->cf->source_addr;
else
*(ip_addr *)z = p->local_addr;
}
else
*(ip_addr *)z = e->attrs->gw;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment