diff options
author | Simon Horman <horms@verge.net.au> | 2013-01-17 15:24:59 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-01-17 13:18:00 -0800 |
commit | f150da5ef8e62a1d2a4a0cb93652a210f5426c31 (patch) | |
tree | 8f649d832d14fa7a180aa0c8bc76406c3d54dbe8 /lib/dpif-netdev.c | |
parent | 685e46dacb6a28e390615e3c49f61b7dc7a92010 (diff) |
dpif-netdev: Limit scope of vlan in dp_netdev_execute_actions
This is to make the code consistent with the proposed MPLS changes
and avoid cluttering the top of the NL_ATTR_FOR_EACH_UNSAFE loop.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r-- | lib/dpif-netdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 3d9cd85f..bec32c38 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -1249,7 +1249,6 @@ dp_netdev_execute_actions(struct dp_netdev *dp, unsigned int left; NL_ATTR_FOR_EACH_UNSAFE (a, left, actions, actions_len) { - const struct ovs_action_push_vlan *vlan; int type = nl_attr_type(a); switch ((enum ovs_action_attr) type) { @@ -1261,10 +1260,11 @@ dp_netdev_execute_actions(struct dp_netdev *dp, dp_netdev_action_userspace(dp, packet, key, a); break; - case OVS_ACTION_ATTR_PUSH_VLAN: - vlan = nl_attr_get(a); + case OVS_ACTION_ATTR_PUSH_VLAN: { + const struct ovs_action_push_vlan *vlan = nl_attr_get(a); eth_push_vlan(packet, vlan->vlan_tci); break; + } case OVS_ACTION_ATTR_POP_VLAN: eth_pop_vlan(packet); |