<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:31:56 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[OPNFLWPLUG-238] TCP Flag Reads Fail to install if a MAC Address is included in MatchBuilder</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-238</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;TCP_Flags match won&apos;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 &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Just upping the pestering as I am blocked until resolved.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;


&lt;p&gt;Failed Match Java API:&lt;br/&gt;
---------------------&lt;/p&gt;

&lt;p&gt;        // Ethertype match&lt;br/&gt;
        EthernetMatchBuilder ethernetType = new EthernetMatchBuilder();&lt;br/&gt;
        EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();&lt;br/&gt;
        ethTypeBuilder.setType(new EtherType(0x0800L));&lt;br/&gt;
        ethernetType.setEthernetType(ethTypeBuilder.build());&lt;br/&gt;
        matchBuilder.setEthernetMatch(ethernetType.build());&lt;/p&gt;

&lt;p&gt;        EthernetMatchBuilder ethernetMatch1 = new EthernetMatchBuilder();&lt;br/&gt;
        EthernetDestinationBuilder ethDestinationBuilder1 = new EthernetDestinationBuilder();&lt;br/&gt;
        ethDestinationBuilder1.setAddress(new MacAddress(&quot;01:00:00:01:01:01&quot;));&lt;br/&gt;
        ethernetMatch1.setEthernetDestination(ethDestinationBuilder1.build());&lt;br/&gt;
        matchBuilder.setEthernetMatch(ethernetMatch1.build());&lt;/p&gt;

&lt;p&gt;        // TCP Protocol Match&lt;br/&gt;
        IpMatchBuilder ipMatch = new IpMatchBuilder(); // ipv4 version&lt;br/&gt;
        ipMatch.setIpProtocol((short) 6);&lt;br/&gt;
        matchBuilder.setIpMatch(ipMatch.build());&lt;/p&gt;

&lt;p&gt;        // TCP Port Match&lt;br/&gt;
        PortNumber dstPort = new PortNumber(80);&lt;br/&gt;
        TcpMatchBuilder tcpMatch = new TcpMatchBuilder();&lt;br/&gt;
        tcpMatch.setTcpDestinationPort(dstPort);&lt;br/&gt;
        matchBuilder.setLayer4Match(tcpMatch.build());&lt;/p&gt;

&lt;p&gt;        TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder();&lt;br/&gt;
        tcpFlagMatch.setTcpFlag(0x002);&lt;br/&gt;
        matchBuilder.setTcpFlagMatch(tcpFlagMatch.build());&lt;/p&gt;

&lt;p&gt;        TunnelBuilder tunnelBuilder = new TunnelBuilder();&lt;br/&gt;
        tunnelBuilder.setTunnelId(new BigInteger(&quot;1600&quot;));&lt;br/&gt;
        matchBuilder.setTunnel(tunnelBuilder.build());&lt;/p&gt;

&lt;p&gt;        return matchBuilder;&lt;/p&gt;


&lt;p&gt;MatchBuilder:&lt;br/&gt;
------------&lt;br/&gt;
[&lt;br/&gt;
  _tunnel=Tunnel[&lt;br/&gt;
    _tunnelId=1600,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _ethernetMatch=EthernetMatch[&lt;br/&gt;
    _ethernetDestination=EthernetDestination[&lt;br/&gt;
      _address=MacAddress[&lt;br/&gt;
        _value=01: 00: 00: 01: 01: 01&lt;br/&gt;
      ],&lt;br/&gt;
      augmentation=[&lt;br/&gt;
      ]&lt;br/&gt;
    ],&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _ipMatch=IpMatch[&lt;br/&gt;
    _ipProtocol=6,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _layer4Match=TcpMatch[&lt;br/&gt;
    _tcpDestinationPort=PortNumber[&lt;br/&gt;
      _value=80&lt;br/&gt;
    ],&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _tcpFlagMatch=TcpFlagMatch[&lt;br/&gt;
    _tcpFlag=2,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  augmentation=[&lt;br/&gt;
  ]&lt;br/&gt;
]&lt;/p&gt;




&lt;p&gt;If I drop the Mac Addr match it works:&lt;br/&gt;
-------------------------------------&lt;/p&gt;


&lt;p&gt;        // Ethertype match&lt;br/&gt;
        EthernetMatchBuilder ethernetType = new EthernetMatchBuilder();&lt;br/&gt;
        EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();&lt;br/&gt;
        ethTypeBuilder.setType(new EtherType(0x0800L));&lt;br/&gt;
        ethernetType.setEthernetType(ethTypeBuilder.build());&lt;br/&gt;
        matchBuilder.setEthernetMatch(ethernetType.build());&lt;/p&gt;

&lt;p&gt;        // TCP Protocol Match&lt;br/&gt;
        IpMatchBuilder ipMatch = new IpMatchBuilder(); // ipv4 version&lt;br/&gt;
        ipMatch.setIpProtocol((short) 6);&lt;br/&gt;
        matchBuilder.setIpMatch(ipMatch.build());&lt;/p&gt;

&lt;p&gt;        // TCP Port Match&lt;br/&gt;
        PortNumber dstPort = new PortNumber(80);&lt;br/&gt;
        TcpMatchBuilder tcpMatch = new TcpMatchBuilder();&lt;br/&gt;
        tcpMatch.setTcpDestinationPort(dstPort);&lt;br/&gt;
        matchBuilder.setLayer4Match(tcpMatch.build());&lt;/p&gt;

&lt;p&gt;        TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder();&lt;br/&gt;
        tcpFlagMatch.setTcpFlag(0x002);&lt;br/&gt;
        matchBuilder.setTcpFlagMatch(tcpFlagMatch.build());&lt;/p&gt;

&lt;p&gt;        TunnelBuilder tunnelBuilder = new TunnelBuilder();&lt;br/&gt;
        tunnelBuilder.setTunnelId(new BigInteger(&quot;1600&quot;));&lt;br/&gt;
        matchBuilder.setTunnel(tunnelBuilder.build());&lt;/p&gt;


&lt;p&gt;Matchbuilder:&lt;br/&gt;
------------&lt;/p&gt;

&lt;p&gt;[&lt;br/&gt;
  _tunnel=Tunnel[&lt;br/&gt;
    _tunnelId=1600,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _ethernetMatch=EthernetMatch[&lt;br/&gt;
    _ethernetType=EthernetType[&lt;br/&gt;
      _type=EtherType[&lt;br/&gt;
        _value=2048&lt;br/&gt;
      ],&lt;br/&gt;
      augmentation=[&lt;br/&gt;
      ]&lt;br/&gt;
    ],&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _ipMatch=IpMatch[&lt;br/&gt;
    _ipProtocol=6,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _layer4Match=TcpMatch[&lt;br/&gt;
    _tcpDestinationPort=PortNumber[&lt;br/&gt;
      _value=80&lt;br/&gt;
    ],&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  _tcpFlagMatch=TcpFlagMatch[&lt;br/&gt;
    _tcpFlag=2,&lt;br/&gt;
    augmentation=[&lt;br/&gt;
    ]&lt;br/&gt;
  ],&lt;br/&gt;
  augmentation=[&lt;br/&gt;
  ]&lt;br/&gt;
]&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: Other&lt;/p&gt;</environment>
        <key id="27506">OPNFLWPLUG-238</key>
            <summary>TCP Flag Reads Fail to install if a MAC Address is included in MatchBuilder</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="brent.salisbury@gmail.com">Brent Salisbury</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Aug 2014 06:57:48 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:17 +0000</updated>
                            <resolved>Thu, 14 Aug 2014 17:41:39 +0000</resolved>
                                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="55995" author="michal.polkorab@gmail.com" created="Thu, 14 Aug 2014 11:21:30 +0000"  >&lt;p&gt;Hi Brent,&lt;/p&gt;

&lt;p&gt;by doing matchBuilder.setEthernetMatch(ethernetMatch1.build()); in the &quot;Failed match Java API&quot;, you overwrite the first ethernetMatch (matchBuilder.setEthernetMatch(ethernetType.build())&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; - which means, that there is no ethType match entry prerequisite in your match (as we can also see in the MatchBuilders).&lt;/p&gt;

&lt;p&gt;That should lead to OFPET_BAD_MATCH - OFPBMC_BAD_PREREQ error message. That&apos;s why the flow is not installed in the first case and is in second case.&lt;/p&gt;

&lt;p&gt;Please try running this code:&lt;/p&gt;

&lt;p&gt;EthernetMatchBuilder ethernetMatch = new EthernetMatchBuilder();&lt;br/&gt;
        EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();&lt;br/&gt;
        ethTypeBuilder.setType(new EtherType(0x0800L));&lt;br/&gt;
        ethernetMatch.setEthernetType(ethTypeBuilder.build());&lt;/p&gt;

&lt;p&gt;        EthernetDestinationBuilder ethDestinationBuilder = new EthernetDestinationBuilder();&lt;br/&gt;
        ethDestinationBuilder.setAddress(new MacAddress(&quot;01:00:00:01:01:01&quot;));&lt;br/&gt;
        ethernetMatch.setEthernetDestination(ethDestinationBuilder.build());&lt;/p&gt;

&lt;p&gt;        matchBuilder.setEthernetMatch(ethernetMatch.build());&lt;/p&gt;

&lt;p&gt;        // TCP Protocol Match&lt;br/&gt;
        IpMatchBuilder ipMatch = new IpMatchBuilder(); // ipv4 version&lt;br/&gt;
        ipMatch.setIpProtocol((short) 6);&lt;br/&gt;
        matchBuilder.setIpMatch(ipMatch.build());&lt;/p&gt;

&lt;p&gt;        // TCP Port Match&lt;br/&gt;
        PortNumber dstPort = new PortNumber(80);&lt;br/&gt;
        TcpMatchBuilder tcpMatch = new TcpMatchBuilder();&lt;br/&gt;
        tcpMatch.setTcpDestinationPort(dstPort);&lt;br/&gt;
        matchBuilder.setLayer4Match(tcpMatch.build());&lt;/p&gt;

&lt;p&gt;        TcpFlagMatchBuilder tcpFlagMatch = new TcpFlagMatchBuilder();&lt;br/&gt;
        tcpFlagMatch.setTcpFlag(0x002);&lt;br/&gt;
        matchBuilder.setTcpFlagMatch(tcpFlagMatch.build());&lt;/p&gt;

&lt;p&gt;        TunnelBuilder tunnelBuilder = new TunnelBuilder();&lt;br/&gt;
        tunnelBuilder.setTunnelId(new BigInteger(&quot;1600&quot;));&lt;br/&gt;
        matchBuilder.setTunnel(tunnelBuilder.build());&lt;/p&gt;</comment>
                            <comment id="55996" author="brent.salisbury@gmail.com" created="Thu, 14 Aug 2014 17:41:39 +0000"  >&lt;p&gt;Thanks Michal(s), really appreciate it. Totally worked, no idea why i thought ethernet fields wouldn&apos;t need a match builder per element. Thanks!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1547</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1547]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02zx3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>