mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
zebra: fix redistribution of new protocols
redistribute is currently limited to "known" protocols. there is no reason for this limitation, so, remove it.
This commit is contained in:
parent
7052f22880
commit
ebf08631ca
@ -245,24 +245,13 @@ zebra_redistribute_add (int command, struct zserv *client, int length)
|
|||||||
|
|
||||||
type = stream_getc (client->ibuf);
|
type = stream_getc (client->ibuf);
|
||||||
|
|
||||||
switch (type)
|
if (type == 0 || type >= ZEBRA_ROUTE_MAX)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (! client->redist[type])
|
||||||
{
|
{
|
||||||
case ZEBRA_ROUTE_KERNEL:
|
client->redist[type] = 1;
|
||||||
case ZEBRA_ROUTE_CONNECT:
|
zebra_redistribute (client, type);
|
||||||
case ZEBRA_ROUTE_STATIC:
|
|
||||||
case ZEBRA_ROUTE_RIP:
|
|
||||||
case ZEBRA_ROUTE_RIPNG:
|
|
||||||
case ZEBRA_ROUTE_OSPF:
|
|
||||||
case ZEBRA_ROUTE_OSPF6:
|
|
||||||
case ZEBRA_ROUTE_BGP:
|
|
||||||
if (! client->redist[type])
|
|
||||||
{
|
|
||||||
client->redist[type] = 1;
|
|
||||||
zebra_redistribute (client, type);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,21 +262,10 @@ zebra_redistribute_delete (int command, struct zserv *client, int length)
|
|||||||
|
|
||||||
type = stream_getc (client->ibuf);
|
type = stream_getc (client->ibuf);
|
||||||
|
|
||||||
switch (type)
|
if (type == 0 || type >= ZEBRA_ROUTE_MAX)
|
||||||
{
|
return;
|
||||||
case ZEBRA_ROUTE_KERNEL:
|
|
||||||
case ZEBRA_ROUTE_CONNECT:
|
client->redist[type] = 0;
|
||||||
case ZEBRA_ROUTE_STATIC:
|
|
||||||
case ZEBRA_ROUTE_RIP:
|
|
||||||
case ZEBRA_ROUTE_RIPNG:
|
|
||||||
case ZEBRA_ROUTE_OSPF:
|
|
||||||
case ZEBRA_ROUTE_OSPF6:
|
|
||||||
case ZEBRA_ROUTE_BGP:
|
|
||||||
client->redist[type] = 0;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user