X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-parse.c;h=dedfb7e27ca90e4249a1164633e70c394bd2c7b6;hb=3e34fbdd62bcd79dad4f62ba6ec920d8f3be71bb;hp=33065aa17b11913c997e1c449f053015b75923dc;hpb=f43e80e023378a2c1ef18d3caee9b76d6d2a6d23;p=sliver-openvswitch.git diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 33065aa17..dedfb7e27 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -384,6 +384,7 @@ parse_named_action(enum ofputil_action_code code, const struct flow *flow, { struct ofpact_tunnel *tunnel; uint16_t vid; + uint16_t ethertype; ovs_be32 ip; uint8_t pcp; uint8_t tos; @@ -424,6 +425,15 @@ parse_named_action(enum ofputil_action_code code, const struct flow *flow, ofpact_put_STRIP_VLAN(ofpacts); break; + case OFPUTIL_OFPAT11_PUSH_VLAN: + ethertype = str_to_u16(arg, "ethertype"); + if (ethertype != ETH_TYPE_VLAN_8021Q) { + /* TODO:XXXX ETH_TYPE_VLAN_8021AD case isn't supported */ + ovs_fatal(0, "%s: not a valid VLAN ethertype", arg); + } + ofpact_put_PUSH_VLAN(ofpacts); + break; + case OFPUTIL_OFPAT10_SET_DL_SRC: case OFPUTIL_OFPAT11_SET_DL_SRC: str_to_mac(arg, ofpact_put_SET_ETH_SRC(ofpacts)->mac);