From: Filip Moc Date: Sun, 7 Jan 2018 14:28:13 +0000 (+0100) Subject: ip fou: pass family attribute as u8 X-Git-Tag: v4.15.0~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33f6dd23a51c4ed5afbf161317c8d01f003f2c2a;p=thirdparty%2Fiproute2.git ip fou: pass family attribute as u8 This fixes fou on big-endian systems. Signed-off-by: Filip Moc Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipfou.c b/ip/ipfou.c index febc2c8c4..1f392adea 100644 --- a/ip/ipfou.c +++ b/ip/ipfou.c @@ -52,7 +52,7 @@ static int fou_parse_opt(int argc, char **argv, struct nlmsghdr *n, __u8 ipproto, type; bool gue_set = false; int ipproto_set = 0; - unsigned short family = AF_INET; + __u8 family = AF_INET; while (argc > 0) { if (!matches(*argv, "port")) { @@ -103,7 +103,7 @@ static int fou_parse_opt(int argc, char **argv, struct nlmsghdr *n, addattr16(n, 1024, FOU_ATTR_PORT, port); addattr8(n, 1024, FOU_ATTR_TYPE, type); - addattr16(n, 1024, FOU_ATTR_AF, family); + addattr8(n, 1024, FOU_ATTR_AF, family); if (ipproto_set) addattr8(n, 1024, FOU_ATTR_IPPROTO, ipproto);