API: Change ip4_address and ip6_address to use type alias.
[vpp.git] / src / vnet / ip / ip_types_api.c
index 11b5276..168e615 100644 (file)
@@ -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);
 }