system-linux: Fix VTI ikey/okey on little endian systems
[project/netifd.git] / system-linux.c
index 86e373c06efd3de46e09662101b4e0bf60fe028d..2d568089b8e7d7aea06921ee17e8d27cad767159 100644 (file)
@@ -2224,10 +2224,10 @@ static int system_add_vti_tunnel(const char *name, const char *kind,
        }
 
        if (okey)
-               nla_put_u32(nlm, IFLA_VTI_OKEY, okey);
+               nla_put_be32(nlm, IFLA_VTI_OKEY, okey);
 
        if (ikey)
-               nla_put_u32(nlm, IFLA_VTI_IKEY, ikey);
+               nla_put_be32(nlm, IFLA_VTI_IKEY, ikey);
 
        nla_nest_end(nlm, infodata);
        nla_nest_end(nlm, linkinfo);