[OPNFLWPLUG-238] TCP Flag Reads Fail to install if a MAC Address is included in MatchBuilder Created: 14/Aug/14 Updated: 27/Sep/21 Resolved: 14/Aug/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Brent Salisbury | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 1547 |
| Description |
|
TCP_Flags match won't work when included with a MAC address in the match fields. I mentioned it to Michal P a couple of months ago and he seemed to have a hunch so Im hoping it is an easy fix. I think I remember him mentioning it is a length issue but time is tight w/ code freeze so Im hoping it is a quick fix as openstack/ODL Sec services are blocked on this one. Marking it major from a perspective of the OVSDB plugin project, feel free to adjust Adding the Java API to hopefully help with checking it out. TCP_FLAG requires version 2.1+ of OVS for support. The flowmod does work and install if using the OVS client. Failed Match Java API: // Ethertype match EthernetMatchBuilder ethernetMatch1 = new EthernetMatchBuilder(); // TCP Protocol Match // TCP Port Match TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder(); TunnelBuilder tunnelBuilder = new TunnelBuilder(); return matchBuilder; MatchBuilder: If I drop the Mac Addr match it works: // Ethertype match // TCP Protocol Match // TCP Port Match TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder(); TunnelBuilder tunnelBuilder = new TunnelBuilder(); Matchbuilder: [ |
| Comments |
| Comment by Michal Polkorab [ 14/Aug/14 ] |
|
Hi Brent, by doing matchBuilder.setEthernetMatch(ethernetMatch1.build()); in the "Failed match Java API", you overwrite the first ethernetMatch (matchBuilder.setEthernetMatch(ethernetType.build()) That should lead to OFPET_BAD_MATCH - OFPBMC_BAD_PREREQ error message. That's why the flow is not installed in the first case and is in second case. Please try running this code: EthernetMatchBuilder ethernetMatch = new EthernetMatchBuilder(); EthernetDestinationBuilder ethDestinationBuilder = new EthernetDestinationBuilder(); matchBuilder.setEthernetMatch(ethernetMatch.build()); // TCP Protocol Match // TCP Port Match TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder(); TunnelBuilder tunnelBuilder = new TunnelBuilder(); |
| Comment by Brent Salisbury [ 14/Aug/14 ] |
|
Thanks Michal(s), really appreciate it. Totally worked, no idea why i thought ethernet fields wouldn't need a match builder per element. Thanks! |