Patchwork [net-next] bondnl: use be32 nla put/get for be32 values

login
register
mail settings
Submitter Jiri Pirko
Date Dec. 14, 2013, 11:32 a.m.
Message ID <1387020730-28211-1-git-send-email-jiri@resnulli.us>
Download mbox | patch
Permalink /patch/301244/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jiri Pirko - Dec. 14, 2013, 11:32 a.m.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/bonding/bond_netlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
David Miller - Dec. 17, 2013, 8:22 p.m.
From: Jiri Pirko <jiri@resnulli.us>
Date: Sat, 14 Dec 2013 12:32:10 +0100

> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Applied, thanks Jiri.
--
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

Patch

diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index d7d84db..990793d 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -125,7 +125,7 @@  static int bond_changelink(struct net_device *bond_dev,
 		int i = 0, rem;
 
 		nla_for_each_nested(attr, data[IFLA_BOND_ARP_IP_TARGET], rem) {
-			__be32 target = nla_get_u32(attr);
+			__be32 target = nla_get_be32(attr);
 			targets[i++] = target;
 		}
 
@@ -224,7 +224,7 @@  static int bond_fill_info(struct sk_buff *skb,
 	targets_added = 0;
 	for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) {
 		if (bond->params.arp_targets[i]) {
-			nla_put_u32(skb, i, bond->params.arp_targets[i]);
+			nla_put_be32(skb, i, bond->params.arp_targets[i]);
 			targets_added = 1;
 		}
 	}