Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300420
b: refs/heads/master
c: 61849dd
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Apr 2, 2012
1 parent 5e7274c commit 693c7da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2eb812e6501597e8b4bc4fdef2db8158c1a3afb6
refs/heads/master: 61849dda1dd4ee286521fdfde388dcfc1d891bad
16 changes: 10 additions & 6 deletions trunk/net/8021q/vlan_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
struct nlattr *nest;
unsigned int i;

NLA_PUT_U16(skb, IFLA_VLAN_ID, vlan_dev_priv(dev)->vlan_id);
if (nla_put_u16(skb, IFLA_VLAN_ID, vlan_dev_priv(dev)->vlan_id))
goto nla_put_failure;
if (vlan->flags) {
f.flags = vlan->flags;
f.mask = ~0;
NLA_PUT(skb, IFLA_VLAN_FLAGS, sizeof(f), &f);
if (nla_put(skb, IFLA_VLAN_FLAGS, sizeof(f), &f))
goto nla_put_failure;
}
if (vlan->nr_ingress_mappings) {
nest = nla_nest_start(skb, IFLA_VLAN_INGRESS_QOS);
Expand All @@ -183,8 +185,9 @@ static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)

m.from = i;
m.to = vlan->ingress_priority_map[i];
NLA_PUT(skb, IFLA_VLAN_QOS_MAPPING,
sizeof(m), &m);
if (nla_put(skb, IFLA_VLAN_QOS_MAPPING,
sizeof(m), &m))
goto nla_put_failure;
}
nla_nest_end(skb, nest);
}
Expand All @@ -202,8 +205,9 @@ static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)

m.from = pm->priority;
m.to = (pm->vlan_qos >> 13) & 0x7;
NLA_PUT(skb, IFLA_VLAN_QOS_MAPPING,
sizeof(m), &m);
if (nla_put(skb, IFLA_VLAN_QOS_MAPPING,
sizeof(m), &m))
goto nla_put_failure;
}
}
nla_nest_end(skb, nest);
Expand Down

0 comments on commit 693c7da

Please sign in to comment.