summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 18:11:21 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 18:11:21 +0200
commitb99c382167cae31082e3eed7a4bb2ddb294dbad8 (patch)
tree0aaaad32dcb53d7225851aae14389f37574c6291
parentRevert "zebra: use link scope for interface routes" (diff)
downloadfrr-b99c382167cae31082e3eed7a4bb2ddb294dbad8.tar.xz
frr-b99c382167cae31082e3eed7a4bb2ddb294dbad8.zip
Revert "Make route flags a 32bit field"
This reverts commit 85eda2c98520a9553bdc05c136618f9d04917e9b.
-rw-r--r--bgpd/bgp_zebra.c8
-rw-r--r--isisd/isis_zebra.c9
-rw-r--r--lib/zclient.c6
-rw-r--r--lib/zclient.h4
-rw-r--r--ospf6d/ospf6_zebra.c2
-rw-r--r--ospfd/ospf_zebra.c10
-rw-r--r--pimd/pim_zebra.c2
-rw-r--r--ripd/rip_zebra.c2
-rw-r--r--ripngd/ripng_zebra.c2
-rw-r--r--zebra/rib.h2
-rw-r--r--zebra/zserv.c12
11 files changed, 29 insertions, 30 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index c3e1b76a3..15db32155 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -601,7 +601,7 @@ zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv4 prefix. */
@@ -716,7 +716,7 @@ zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv6 prefix. */
@@ -1199,7 +1199,7 @@ void
bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
afi_t afi, safi_t safi)
{
- u_int32_t flags;
+ int flags;
u_char distance;
struct peer *peer;
struct bgp_info *mpinfo;
@@ -1620,7 +1620,7 @@ bgp_zebra_announce_table (struct bgp *bgp, afi_t afi, safi_t safi)
void
bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi)
{
- u_int32_t flags;
+ int flags;
struct peer *peer;
peer = info->peer;
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index f43987bc1..45728ad2c 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -257,8 +257,7 @@ static void
isis_zebra_route_add_ipv4 (struct prefix *prefix,
struct isis_route_info *route_info)
{
- u_char message;
- u_int32_t flags;
+ u_char message, flags;
int psize;
struct stream *stream;
struct isis_nexthop *nexthop;
@@ -286,7 +285,7 @@ isis_zebra_route_add_ipv4 (struct prefix *prefix,
/* instance */
stream_putw (stream, 0);
/* flags */
- stream_putl (stream, flags);
+ stream_putc (stream, flags);
/* message */
stream_putc (stream, message);
/* SAFI */
@@ -567,7 +566,7 @@ isis_zebra_read_ipv4 (int command, struct zclient *zclient,
api.type = stream_getc (stream);
api.instance = stream_getw (stream);
- api.flags = stream_getl (stream);
+ api.flags = stream_getc (stream);
api.message = stream_getc (stream);
p.family = AF_INET;
@@ -624,7 +623,7 @@ isis_zebra_read_ipv6 (int command, struct zclient *zclient,
ifindex = 0;
api.type = stream_getc(stream);
- api.flags = stream_getl(stream);
+ api.flags = stream_getc(stream);
api.message = stream_getc(stream);
p.family = AF_INET6;
diff --git a/lib/zclient.c b/lib/zclient.c
index c70ff90a1..5193a282a 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -733,7 +733,7 @@ zapi_ipv4_route (u_char cmd, struct zclient *zclient, struct prefix_ipv4 *p,
/* Put type and nexthop. */
stream_putc (s, api->type);
stream_putw (s, api->instance);
- stream_putl (s, api->flags);
+ stream_putc (s, api->flags);
stream_putc (s, api->message);
stream_putw (s, api->safi);
@@ -801,7 +801,7 @@ zapi_ipv4_route_ipv6_nexthop (u_char cmd, struct zclient *zclient,
/* Put type and nexthop. */
stream_putc (s, api->type);
stream_putw (s, api->instance);
- stream_putl (s, api->flags);
+ stream_putc (s, api->flags);
stream_putc (s, api->message);
stream_putw (s, api->safi);
@@ -867,7 +867,7 @@ zapi_ipv6_route (u_char cmd, struct zclient *zclient, struct prefix_ipv6 *p,
/* Put type and nexthop. */
stream_putc (s, api->type);
stream_putw (s, api->instance);
- stream_putl (s, api->flags);
+ stream_putc (s, api->flags);
stream_putc (s, api->message);
stream_putw (s, api->safi);
diff --git a/lib/zclient.h b/lib/zclient.h
index 4edbd7636..231b4e9b4 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -134,7 +134,7 @@ struct zapi_ipv4
u_char type;
u_short instance;
- u_int32_t flags;
+ u_char flags;
u_char message;
@@ -222,7 +222,7 @@ struct zapi_ipv6
u_char type;
u_short instance;
- u_int32_t flags;
+ u_char flags;
u_char message;
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index b4381cf81..6dee1424a 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -229,7 +229,7 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv6 prefix. */
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 062b4d601..8752e83ed 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -355,7 +355,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
{
u_char message;
u_char distance;
- u_int32_t flags;
+ u_char flags;
int psize;
struct stream *s;
struct ospf_path *path;
@@ -393,7 +393,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
zclient_create_header (s, ZEBRA_IPV4_ROUTE_ADD, VRF_DEFAULT);
stream_putc (s, ZEBRA_ROUTE_OSPF);
stream_putw (s, ospf->instance);
- stream_putl (s, flags);
+ stream_putc (s, flags);
stream_putc (s, message);
stream_putw (s, SAFI_UNICAST);
@@ -492,7 +492,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
{
u_char message;
u_char distance;
- u_int32_t flags;
+ u_char flags;
int psize;
struct stream *s;
struct ospf_path *path;
@@ -516,7 +516,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
zclient_create_header (s, ZEBRA_IPV4_ROUTE_DELETE, VRF_DEFAULT);
stream_putc (s, ZEBRA_ROUTE_OSPF);
stream_putw (s, ospf->instance);
- stream_putl (s, flags);
+ stream_putc (s, flags);
stream_putc (s, message);
stream_putw (s, SAFI_UNICAST);
@@ -1064,7 +1064,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv4 prefix. */
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 1a8d5f22b..b25e8b94d 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -552,7 +552,7 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
/* Type, flags, message. */
api.type = stream_getc(s);
api.instance = stream_getw (s);
- api.flags = stream_getl(s);
+ api.flags = stream_getc(s);
api.message = stream_getc(s);
/* IPv4 prefix length. */
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 627755e1c..c312641d4 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -147,7 +147,7 @@ rip_zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv4 prefix. */
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 803fd7415..1184cd0db 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -143,7 +143,7 @@ ripng_zebra_read_ipv6 (int command, struct zclient *zclient,
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
/* IPv6 prefix. */
diff --git a/zebra/rib.h b/zebra/rib.h
index 285166f06..0f7f70ada 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -79,7 +79,7 @@ struct rib
* This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
* to clients via Zserv
*/
- u_int32_t flags;
+ u_char flags;
/* RIB internal status */
u_char status;
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 3b2095d65..4cfeead88 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -628,7 +628,7 @@ zsend_redistribute_route (int cmd, struct zserv *client, struct prefix *p,
/* Put type and nexthop. */
stream_putc (s, rib->type);
stream_putw (s, rib->instance);
- stream_putl (s, rib->flags);
+ stream_putc (s, rib->flags);
/* marker for message flags field */
messmark = stream_get_endp (s);
@@ -1055,7 +1055,7 @@ zread_ipv4_add (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
/* Type, flags, message. */
rib->type = stream_getc (s);
rib->instance = stream_getw (s);
- rib->flags = stream_getl (s);
+ rib->flags = stream_getc (s);
message = stream_getc (s);
safi = stream_getw (s);
rib->uptime = time (NULL);
@@ -1159,7 +1159,7 @@ zread_ipv4_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
api.safi = stream_getw (s);
@@ -1265,7 +1265,7 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct
/* Type, flags, message. */
rib->type = stream_getc (s);
rib->instance = stream_getw (s);
- rib->flags = stream_getl (s);
+ rib->flags = stream_getc (s);
message = stream_getc (s);
safi = stream_getw (s);
rib->uptime = time (NULL);
@@ -1392,7 +1392,7 @@ zread_ipv6_add (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
/* Type, flags, message. */
rib->type = stream_getc (s);
rib->instance = stream_getw (s);
- rib->flags = stream_getl (s);
+ rib->flags = stream_getc (s);
message = stream_getc (s);
safi = stream_getw (s);
rib->uptime = time (NULL);
@@ -1506,7 +1506,7 @@ zread_ipv6_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
/* Type, flags, message. */
api.type = stream_getc (s);
api.instance = stream_getw (s);
- api.flags = stream_getl (s);
+ api.flags = stream_getc (s);
api.message = stream_getc (s);
api.safi = stream_getw (s);