naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0107-utils-add-get_be-16-32-64-use-them-where-possible.patch

4aca6e
From cd5fd1c1b943da08c683ee9bc22eed32624d2130 Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Fri, 17 Mar 2017 13:21:10 +0100
4aca6e
Subject: [PATCH] utils: add get_be{16, 32, 64}, use them where possible
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1422629
4aca6e
Upstream Status: iproute2.git commit 9f7401fa49671
4aca6e
Conflicts: Just reapplying an already backported commit to get formerly
4aca6e
           left out chunks in flower sources.
4aca6e
4aca6e
commit 9f7401fa4967178a071c53498f6bdc460c7cc4ea
4aca6e
Author: Sabrina Dubroca <sd@queasysnail.net>
4aca6e
Date:   Fri Jun 3 16:45:46 2016 +0200
4aca6e
4aca6e
    utils: add get_be{16, 32, 64}, use them where possible
4aca6e
4aca6e
    Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
4aca6e
    Acked-by: Phil Sutter <phil@nwl.cc>
4aca6e
---
4aca6e
 tc/f_flower.c         | 4 ++--
4aca6e
 2 files changed, 6 insertions(+), 6 deletions(-)
4aca6e
4aca6e
diff --git a/tc/f_flower.c b/tc/f_flower.c
4aca6e
index f0d146f..11e6242 100644
4aca6e
--- a/tc/f_flower.c
4aca6e
+++ b/tc/f_flower.c
4aca6e
@@ -150,11 +150,11 @@ static int flower_parse_port(char *str, __u8 ip_port,
4aca6e
 		return -1;
4aca6e
 	}
4aca6e
 
4aca6e
-	ret = get_u16(&port, str, 10);
4aca6e
+	ret = get_be16(&port, str, 10);
4aca6e
 	if (ret)
4aca6e
 		return -1;
4aca6e
 
4aca6e
-	addattr16(n, MAX_MSG, type, htons(port));
4aca6e
+	addattr16(n, MAX_MSG, type, port);
4aca6e
 
4aca6e
 	return 0;
4aca6e
 }
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e