When you fill next hop address with v4 address while using DX4 function, it parses it from last 4 bytes, not first 4
if you use
new byte[]{X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0} - It writes 0.0.0.0
if you use
new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,X,X,X,X} It writes address correctly.
From experience of other vpp apis, in general ,if there is an array used both for v4 and v6 addresses, v4 address is put in first 4 bytes, not last.
For ex: one_add_del_map_resolver uses this ordering of bytes(and many others)