X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip_types_api.c;h=6bc035ebef22925820d29c6ae67ed50f0d3b033c;hb=775f73c;hp=11b52760fad92ab27fa0d5c0c9d837bb01a9b93e;hpb=86327be9751ad54cb24d16c161cacb001dc20772;p=vpp.git diff --git a/src/vnet/ip/ip_types_api.c b/src/vnet/ip/ip_types_api.c index 11b52760fad..6bc035ebef2 100644 --- a/src/vnet/ip/ip_types_api.c +++ b/src/vnet/ip/ip_types_api.c @@ -67,9 +67,9 @@ ip_address_union_encode (const ip46_address_t * in, vl_api_address_union_t * out) { if (ADDRESS_IP6 == clib_net_to_host_u32 (af)) - memcpy (out->ip6.address, &in->ip6, sizeof (out->ip6)); + memcpy (&out->ip6, &in->ip6, sizeof (out->ip6)); else - memcpy (out->ip4.address, &in->ip4, sizeof (out->ip4)); + memcpy (&out->ip4, &in->ip4, sizeof (out->ip4)); } void @@ -107,6 +107,7 @@ ip_prefix_decode (const vl_api_prefix_t * in, fib_prefix_t * out) break; } out->fp_len = in->address_length; + out->___fp___pad = 0; ip_address_decode (&in->address, &out->fp_addr); }