summaryrefslogtreecommitdiffstats
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-11 22:20:13 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-01-14 14:41:33 +0100
commit49db7a7b055d69a8d3892a9171912b8b0f00aa45 (patch)
treecf173e30c23a4a5b682b3c15242e31615a540ec8 /lib/zclient.h
parentMerge pull request #3567 from donaldsharp/cleanup_route_table_creation (diff)
downloadfrr-49db7a7b055d69a8d3892a9171912b8b0f00aa45.tar.xz
frr-49db7a7b055d69a8d3892a9171912b8b0f00aa45.zip
lib, zebra: add AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_* messages
Some daemons like ospfd and isisd have the ability to advertise a default route to their peers only if one exists in the RIB. This is what the "default-information originate" commands do when used without the "always" parameter. For that to work, these daemons use the ZEBRA_REDISTRIBUTE_DEFAULT_ADD message to request default route information to zebra. The problem is that this message didn't have an AFI parameter, so a default route from any address-family would satisfy the requests from both daemons (e.g. ::/0 would trigger ospfd to advertise a default route to its peers, and 0.0.0.0/0 would trigger isisd to advertise a default route to its IPv6 peers). Fix this by adding an AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_{ADD,DELETE} messages and making the corresponding code changes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index 831cccfb7..401d6c400 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -216,7 +216,7 @@ struct zclient {
vrf_bitmap_t redist[AFI_MAX][ZEBRA_ROUTE_MAX];
/* Redistribute defauilt. */
- vrf_bitmap_t default_information;
+ vrf_bitmap_t default_information[AFI_MAX];
/* Pointer to the callback functions. */
void (*zebra_connected)(struct zclient *);
@@ -479,13 +479,16 @@ extern int zebra_redistribute_send(int command, struct zclient *, afi_t,
int type, unsigned short instance,
vrf_id_t vrf_id);
+extern int zebra_redistribute_default_send(int command, struct zclient *zclient,
+ afi_t afi, vrf_id_t vrf_id);
+
/* If state has changed, update state and call zebra_redistribute_send. */
extern void zclient_redistribute(int command, struct zclient *, afi_t, int type,
unsigned short instance, vrf_id_t vrf_id);
/* If state has changed, update state and send the command to zebra. */
extern void zclient_redistribute_default(int command, struct zclient *,
- vrf_id_t vrf_id);
+ afi_t, vrf_id_t vrf_id);
/* Send the message in zclient->obuf to the zebra daemon (or enqueue it).
Returns 0 for success or -1 on an I/O error. */