mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Create default net based on adress type
This commit is contained in:
parent
e468296355
commit
5cb2e20f4d
@ -1539,9 +1539,20 @@ aggregator_start(struct proto *P)
|
||||
.data = p,
|
||||
};
|
||||
|
||||
struct network *default_net = mb_alloc(P->pool, sizeof(struct network) + sizeof(struct net_addr_ip4));
|
||||
struct network *default_net = NULL;
|
||||
|
||||
if (p->addr_type == NET_IP4)
|
||||
{
|
||||
default_net = mb_alloc(P->pool, sizeof(struct network) + sizeof(struct net_addr_ip4));
|
||||
net_fill_ip4(default_net->n.addr, IP4_NONE, 0);
|
||||
log("Creating net %p for default route", default_net);
|
||||
}
|
||||
else if (p->addr_type == NET_IP6)
|
||||
{
|
||||
default_net = mb_alloc(P->pool, sizeof(struct network) + sizeof(struct net_addr_ip6));
|
||||
net_fill_ip6(default_net->n.addr, IP6_NONE, 0);
|
||||
log("Creating net %p for default route", default_net);
|
||||
}
|
||||
|
||||
/* Create route attributes with zero nexthop */
|
||||
struct rta rta = { 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user