diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c index 2a0b05fec205..b1c8fbade48a 100644 --- a/zebra/zebra_srv6.c +++ b/zebra/zebra_srv6.c @@ -222,7 +222,7 @@ separate_locator_prefix_into_chunk(struct srv6_locator *loc, { struct prefix_ipv6 chunk_prefix = loc->prefix; chunk_prefix.prefixlen += loc->perchunk_bits_length; - chunk_prefix.prefix.s6_addr16[4] = htons(chunk_index); + chunk_prefix.prefix.s6_addr32[2] = (uint32_t)htons(chunk_index); return chunk_prefix; }