*: Widen width of Zserv routing tag field.
* lib/zebra.h: Introduce a route_tag_t type for route tags generally,
and make it 4 bytes wide - so it can directly hold things like an ASN, or
the OSPF ASE-LSA tag.
* zebra/rib.h: Use route_tag_t instead of u_short.
* *: Update 'u_short (*)?(tag|tmp)' to use route_tag_t instead of u_short.
Update stream_{get,put} to l instead of w.
* ospf_zebra.c: (ospf_zebra_add) test OSPF tag within range of ROUTE_TAG_MAX.
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 6c57a6f..38fecd9 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -279,7 +279,7 @@
api.metric = 0;
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
@@ -366,7 +366,7 @@
api.metric = 0;
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
@@ -694,7 +694,7 @@
struct bgp_info *mpinfo;
size_t oldsize, newsize;
u_int32_t nhcount;
- u_short tag = 0;
+ route_tag_t tag = 0;
if (zclient->sock < 0)
return;