diff mbox

[iproute2] macvlan: fix typo in macvlan_print_opt()

Message ID 1377762628-28843-1-git-send-email-ljaenicke@innominate.com
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Lutz Jaenicke Aug. 29, 2013, 7:50 a.m. UTC
The mode information is contained in IFLA_MACVLAN_MODE instead
of IFLA_VLAN_ID (both evaluating to "1" in their enums).

Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>
---
 ip/iplink_macvlan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Hemminger Aug. 31, 2013, 5:32 p.m. UTC | #1
On Thu, 29 Aug 2013 09:50:28 +0200
Lutz Jaenicke <ljaenicke@innominate.com> wrote:

> The mode information is contained in IFLA_MACVLAN_MODE instead
> of IFLA_VLAN_ID (both evaluating to "1" in their enums).
> 
> Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>

Thanks applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/ip/iplink_macvlan.c b/ip/iplink_macvlan.c
index 5b4b868..ec51106 100644
--- a/ip/iplink_macvlan.c
+++ b/ip/iplink_macvlan.c
@@ -79,7 +79,7 @@  static void macvlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]
 	    RTA_PAYLOAD(tb[IFLA_MACVLAN_MODE]) < sizeof(__u32))
 		return;
 
-	mode = rta_getattr_u32(tb[IFLA_VLAN_ID]);
+	mode = rta_getattr_u32(tb[IFLA_MACVLAN_MODE]);
 	fprintf(f, " mode %s ",
 		  mode == MACVLAN_MODE_PRIVATE ? "private"
 		: mode == MACVLAN_MODE_VEPA    ? "vepa"