diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-09-12 10:49:55 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-09-12 12:16:21 -0700 |
| commit | 2f2df2f4dafada02f022c2900f7a17628af7a0d1 (patch) | |
| tree | bf373317bb31d949da56a1abab9a39c3af701bf7 /ofproto | |
| parent | c87112ca1a90fe77cbba6c340ef7e30815b537f7 (diff) | |
| download | openvswitch-2f2df2f4dafada02f022c2900f7a17628af7a0d1.tar.gz | |
ofproto-dpif: Fix check for 802.1Q header in commit_odp_actions().
The 'vlan_tci' member of struct flow has value 0, not OFP_VLAN_NONE, when
there is no 802.1Q header.
Fixes a problem introduced in commit d9065a90b6b "datapath: VLAN actions
should use push/pop semantics."
Found by sparse.
CC: Pravin Shelar <pshelar@nicira.com>
Diffstat (limited to 'ofproto')
| -rw-r--r-- | ofproto/ofproto-dpif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3074881ea..c632df64c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -2859,7 +2859,7 @@ commit_odp_actions(struct action_xlate_ctx *ctx) if (!(flow->vlan_tci & htons(VLAN_CFI))) { nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_POP_VLAN); } else { - if (base->vlan_tci != OFP_VLAN_NONE) { + if (base->vlan_tci != htons(0)) { nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_POP_VLAN); } nl_msg_put_be16(odp_actions, OVS_ACTION_ATTR_PUSH_VLAN, |
