X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fin-band.c;h=710aadd9dae57453ab6bc8817c7e430f08e61236;hb=47271d0d8d12c5689cd0103dc47b62913a515b36;hp=9aa03afc0e2e4081ecae1ac2003914332537287b;hpb=946350dce6c717af540f2bff68f1012fc8414d86;p=openvswitch diff --git a/ofproto/in-band.c b/ofproto/in-band.c index 9aa03afc..710aadd9 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -35,6 +35,7 @@ #include "openflow/openflow.h" #include "packets.h" #include "poll-loop.h" +#include "private.h" #include "timeval.h" #include "vlog.h" @@ -403,19 +404,18 @@ add_rule(struct in_band *ib, const struct cls_rule *rule) { struct { struct nx_action_set_queue nxsq; - struct ofp_action_output oao; + union ofp_action oa; } actions; memset(&actions, 0, sizeof actions); - actions.oao.type = htons(OFPAT_OUTPUT); - actions.oao.len = htons(sizeof actions.oao); - actions.oao.port = htons(OFPP_NORMAL); - actions.oao.max_len = htons(0); + actions.oa.output.type = htons(OFPAT_OUTPUT); + actions.oa.output.len = htons(sizeof actions.oa); + actions.oa.output.port = htons(OFPP_NORMAL); + actions.oa.output.max_len = htons(0); if (ib->queue_id < 0) { - ofproto_add_flow(ib->ofproto, rule, - (union ofp_action *) &actions.oao, 1); + ofproto_add_flow(ib->ofproto, rule, &actions.oa, 1); } else { actions.nxsq.type = htons(OFPAT_VENDOR); actions.nxsq.len = htons(sizeof actions.nxsq);