summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_ecommunity.c8
-rw-r--r--bgpd/bgp_packet.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index bdcc12705c..e19f516505 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -702,8 +702,12 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
len = sprintf(
str_buf + str_pnt,
"EVPN:%02x:%02x:%02x:%02x:%02x:%02x",
- macaddr[0], macaddr[1], macaddr[2],
- macaddr[3], macaddr[4], macaddr[5]);
+ (uint8_t)macaddr[0],
+ (uint8_t)macaddr[1],
+ (uint8_t)macaddr[2],
+ (uint8_t)macaddr[3],
+ (uint8_t)macaddr[4],
+ (uint8_t)macaddr[5]);
} else if (*pnt
== ECOMMUNITY_EVPN_SUBTYPE_MACMOBILITY) {
u_int32_t seqnum;
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 28700dd241..b7f0114045 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -2012,6 +2012,7 @@ static int bgp_capability_msg_parse(struct peer *peer, u_char *pnt,
/* Fetch structure to the byte stream. */
memcpy(&mpc, pnt + 3, sizeof(struct capability_mp_data));
+ pnt += hdr->length + 3;
/* We know MP Capability Code. */
if (hdr->code == CAPABILITY_CODE_MP) {
@@ -2064,7 +2065,6 @@ static int bgp_capability_msg_parse(struct peer *peer, u_char *pnt,
"%s unrecognized capability code: %d - ignored",
peer->host, hdr->code);
}
- pnt += hdr->length + 3;
}
return 0;
}