system-linux: fix build error
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 4 Mar 2016 18:36:32 +0000 (19:36 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 4 Mar 2016 18:36:35 +0000 (19:36 +0100)
The libnl-tiny library does not provide a nla_put_be32(), use nla_put_u32()
again in conjunction with htonl() to convert the values.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
system-linux.c

index 2d568089b8e7d7aea06921ee17e8d27cad767159..052bc941a9d036040319f9f2b7f67f97ab904fa1 100644 (file)
@@ -2224,10 +2224,10 @@ static int system_add_vti_tunnel(const char *name, const char *kind,
        }
 
        if (okey)
-               nla_put_be32(nlm, IFLA_VTI_OKEY, okey);
+               nla_put_u32(nlm, IFLA_VTI_OKEY, htonl(okey));
 
        if (ikey)
-               nla_put_be32(nlm, IFLA_VTI_IKEY, ikey);
+               nla_put_u32(nlm, IFLA_VTI_IKEY, htonl(ikey));
 
        nla_nest_end(nlm, infodata);
        nla_nest_end(nlm, linkinfo);