Skip to content

Commit

Permalink
Merge pull request #6 from noironetworks/mchalla-ganga
Browse files Browse the repository at this point in the history
Rule priority incorrect for opflex trunk ports.
  • Loading branch information
tomflynn committed Oct 25, 2018
2 parents bcd1910 + 8a57a47 commit d7800a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion agent-ovs/ovs/AccessFlowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ static void flowBypassDhcpRequest(FlowEntryList& el, bool v4, uint32_t inport,
uint32_t outport,
std::shared_ptr<const Endpoint>& ep ) {
FlowBuilder fb;
fb.priority(200).inPort(inport);
if (ep->getAccessIfaceVlan()) {
fb.priority(201).inPort(inport);
} else {
fb.priority(200).inPort(inport);
}

flowutils::match_dhcp_req(fb, v4);
fb.action().reg(MFF_REG7, outport);

Expand Down
4 changes: 2 additions & 2 deletions agent-ovs/ovs/test/AccessFlowManager_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void AccessFlowManagerFixture::initExpDhcpEp(shared_ptr<Endpoint>& ep) {
initExpEp(ep);
if (ep->getDHCPv4Config()) {
ADDF(Bldr()
.table(GRP).priority(200).udp().in(access)
.table(GRP).priority(ep->getAccessIfaceVlan() ? 201 : 200).udp().in(access)
.isVlan(ep->getAccessIfaceVlan().get())
.isTpSrc(68).isTpDst(67)
.actions()
Expand All @@ -348,7 +348,7 @@ void AccessFlowManagerFixture::initExpDhcpEp(shared_ptr<Endpoint>& ep) {
}
if (ep->getDHCPv6Config()) {
ADDF(Bldr()
.table(GRP).priority(200).udp6().in(access)
.table(GRP).priority(ep->getAccessIfaceVlan() ? 201 : 200).udp6().in(access)
.isVlan(ep->getAccessIfaceVlan().get())
.isTpSrc(546).isTpDst(547)
.actions()
Expand Down

0 comments on commit d7800a5

Please sign in to comment.