*: 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/lib/zclient.c b/lib/zclient.c
index a1de831..eb8de1a 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -591,7 +591,7 @@
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
stream_putl (s, api->mtu);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_TAG))
- stream_putw (s, api->tag);
+ stream_putl (s, api->tag);
/* Put length at the first point of the stream. */
stream_putw_at (s, 0, stream_get_endp (s));
@@ -649,7 +649,7 @@
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
stream_putl (s, api->mtu);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_TAG))
- stream_putw (s, api->tag);
+ stream_putl (s, api->tag);
/* Put length at the first point of the stream. */
stream_putw_at (s, 0, stream_get_endp (s));
diff --git a/lib/zclient.h b/lib/zclient.h
index 810c927..d46728d 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -133,7 +133,7 @@
u_char distance;
- u_short tag;
+ route_tag_t tag;
u_int32_t metric;
@@ -213,7 +213,7 @@
u_char distance;
- u_short tag;
+ route_tag_t tag;
u_int32_t metric;
diff --git a/lib/zebra.h b/lib/zebra.h
index a75eb6d..a405d46 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -535,4 +535,7 @@
/* VRF ID type. */
typedef u_int16_t vrf_id_t;
+typedef uint32_t route_tag_t;
+#define ROUTE_TAG_MAX UINT32_MAX
+
#endif /* _ZEBRA_H */