diff options
| -rw-r--r-- | lib/zclient.c | 2 | ||||
| -rw-r--r-- | pimd/pim_zlookup.c | 2 | ||||
| -rw-r--r-- | staticd/static_zebra.c | 2 | ||||
| -rw-r--r-- | zebra/zapi_msg.c | 8 | ||||
| -rw-r--r-- | zebra/zebra_rnh.c | 8 | ||||
| -rw-r--r-- | zebra/zebra_srte.c | 4 | 
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 0e832f0d8f..557d9c3eb9 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -2374,7 +2374,7 @@ static bool zapi_nexthop_update_decode(struct stream *s, struct prefix *match,  	STREAM_GETW(s, nhr->instance);  	STREAM_GETC(s, nhr->distance);  	STREAM_GETL(s, nhr->metric); -	STREAM_GETC(s, nhr->nexthop_num); +	STREAM_GETW(s, nhr->nexthop_num);  	for (i = 0; i < nhr->nexthop_num; i++) {  		if (zapi_nexthop_decode(s, &(nhr->nexthops[i]), 0, 0) != 0) diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index c19119fa47..5d344f1f66 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -193,7 +193,7 @@ static int zclient_read_nexthop(struct pim_instance *pim,  	distance = stream_getc(s);  	metric = stream_getl(s); -	nexthop_num = stream_getc(s); +	nexthop_num = stream_getw(s);  	if (nexthop_num < 1 || nexthop_num > router->multipath) {  		if (PIM_DEBUG_PIM_NHT_DETAIL) diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 420ed7903b..d76befc131 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -43,7 +43,7 @@ struct static_nht_data {  	vrf_id_t nh_vrf_id;  	uint32_t refcount; -	uint8_t nh_num; +	uint16_t nh_num;  	bool registered;  }; diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 7dae75bacc..10acee9be4 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -647,7 +647,7 @@ static int zsend_nexthop_lookup_mrib(struct zserv *client, struct ipaddr *addr,  {  	struct stream *s;  	unsigned long nump; -	uint8_t num; +	uint16_t num;  	struct nexthop *nexthop;  	/* Get output stream. */ @@ -667,7 +667,7 @@ static int zsend_nexthop_lookup_mrib(struct zserv *client, struct ipaddr *addr,  		/* remember position for nexthop_num */  		nump = stream_get_endp(s);  		/* reserve room for nexthop_num */ -		stream_putc(s, 0); +		stream_putw(s, 0);  		nhg = rib_get_fib_nhg(re);  		for (ALL_NEXTHOPS_PTR(nhg, nexthop)) {  			if (rnh_nexthop_valid(re, nexthop)) @@ -675,11 +675,11 @@ static int zsend_nexthop_lookup_mrib(struct zserv *client, struct ipaddr *addr,  		}  		/* store nexthop_num */ -		stream_putc_at(s, nump, num); +		stream_putw_at(s, nump, num);  	} else {  		stream_putc(s, 0); /* distance */  		stream_putl(s, 0); /* metric */ -		stream_putc(s, 0); /* nexthop_num */ +		stream_putw(s, 0); /* nexthop_num */  	}  	stream_putw_at(s, 0, stream_get_endp(s)); diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 89317be74d..483a791644 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -1141,7 +1141,7 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,  	struct stream *s = NULL;  	struct route_entry *re;  	unsigned long nump; -	uint8_t num; +	uint16_t num;  	struct nexthop *nh;  	struct route_node *rn;  	int ret; @@ -1212,7 +1212,7 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,  		stream_putl(s, re->metric);  		num = 0;  		nump = stream_get_endp(s); -		stream_putc(s, 0); +		stream_putw(s, 0);  		nhg = rib_get_fib_nhg(re);  		for (ALL_NEXTHOPS_PTR(nhg, nh)) @@ -1240,13 +1240,13 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,  				}  		} -		stream_putc_at(s, nump, num); +		stream_putw_at(s, nump, num);  	} else {  		stream_putc(s, 0); // type  		stream_putw(s, 0); // instance  		stream_putc(s, 0); // distance  		stream_putl(s, 0); // metric -		stream_putc(s, 0); // nexthops +		stream_putw(s, 0); // nexthops  	}  	stream_putw_at(s, 0, stream_get_endp(s)); diff --git a/zebra/zebra_srte.c b/zebra/zebra_srte.c index c0b83382c4..bb8d4b3b40 100644 --- a/zebra/zebra_srte.c +++ b/zebra/zebra_srte.c @@ -145,7 +145,7 @@ static int zebra_sr_policy_notify_update_client(struct zebra_sr_policy *policy,  			stream_putc(s, nhlfe->distance);  			stream_putl(s, 0); /* metric - not available */  			nump = stream_get_endp(s); -			stream_putc(s, 0); +			stream_putw(s, 0);  		}  		zapi_nexthop_from_nexthop(&znh, nhlfe->nexthop); @@ -155,7 +155,7 @@ static int zebra_sr_policy_notify_update_client(struct zebra_sr_policy *policy,  		num++;  	} -	stream_putc_at(s, nump, num); +	stream_putw_at(s, nump, num);  	stream_putw_at(s, 0, stream_get_endp(s));  	client->nh_last_upd_time = monotime(NULL);  | 
