<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:31:59 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-261] NullPointerException occurred when a MD-SAL flow has a push-vlan action</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-261</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;This issue was originally reported in &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-222&quot; title=&quot;MD-SAL app cannot create a flow entry which adds a VLAN tag with the specified VLAN ID into untagged frame.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-222&quot;&gt;&lt;del&gt;OPNFLWPLUG-222&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When a controller with the OF plugin connected to a OpenFlow 1.0 switch and I tried to install a flow entry with push-vlan action into the switch, NullPointerException occurred.&lt;/p&gt;

&lt;p&gt;It seems that OF plugin does not correctly ignore push-vlan action.&lt;br/&gt;
(We think that ignoring push-vlan action against OF 1.0 switch is ok, but the way to ignore is not correct.)&lt;br/&gt;
Due to this issue, VTN Manager failed to create a flow entry.&lt;/p&gt;


&lt;p&gt;I used the latest code on September 2nd, 2014.&lt;/p&gt;

&lt;p&gt;You can reproduce this issue using RESTCONF API.&lt;/p&gt;

&lt;p&gt;URL: &lt;a href=&quot;http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://192.168.2.56:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Method: PUT&lt;/p&gt;

&lt;p&gt;Body:&lt;br/&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;flow xmlns=&quot;urn:opendaylight:flow:inventory&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;priority&amp;gt;29&amp;lt;/priority&amp;gt;&lt;br/&gt;
    &amp;lt;flow-name&amp;gt;Foo8&amp;lt;/flow-name&amp;gt;&lt;br/&gt;
    &amp;lt;match&amp;gt;&lt;br/&gt;
        &amp;lt;ethernet-match&amp;gt;&lt;br/&gt;
            &amp;lt;ethernet-type&amp;gt;&lt;br/&gt;
                &amp;lt;type&amp;gt;2048&amp;lt;/type&amp;gt;&lt;br/&gt;
            &amp;lt;/ethernet-type&amp;gt;&lt;br/&gt;
        &amp;lt;/ethernet-match&amp;gt;&lt;br/&gt;
        &amp;lt;ipv4-destination&amp;gt;10.0.10.9/24&amp;lt;/ipv4-destination&amp;gt;&lt;br/&gt;
    &amp;lt;/match&amp;gt;&lt;br/&gt;
    &amp;lt;id&amp;gt;9&amp;lt;/id&amp;gt;&lt;br/&gt;
    &amp;lt;table_id&amp;gt;0&amp;lt;/table_id&amp;gt;&lt;br/&gt;
    &amp;lt;instructions&amp;gt;&lt;br/&gt;
        &amp;lt;instruction&amp;gt;&lt;br/&gt;
            &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
            &amp;lt;apply-actions&amp;gt;&lt;br/&gt;
                &amp;lt;action&amp;gt;&lt;br/&gt;
                   &amp;lt;order&amp;gt;0&amp;lt;/order&amp;gt;&lt;br/&gt;
                   &amp;lt;push-vlan-action&amp;gt;&lt;br/&gt;
                     &amp;lt;vlan-id&amp;gt;156&amp;lt;/vlan-id&amp;gt;&lt;br/&gt;
                     &amp;lt;ethernet-type&amp;gt;33024&amp;lt;/ethernet-type&amp;gt;&lt;br/&gt;
                   &amp;lt;/push-vlan-action&amp;gt;&lt;br/&gt;
                &amp;lt;/action&amp;gt;&lt;br/&gt;
            &amp;lt;/apply-actions&amp;gt;&lt;br/&gt;
        &amp;lt;/instruction&amp;gt;&lt;br/&gt;
    &amp;lt;/instructions&amp;gt;&lt;br/&gt;
&amp;lt;/flow&amp;gt;&lt;/p&gt;


&lt;p&gt;The output what I saw:&lt;/p&gt;

&lt;p&gt;2014-09-02 22:13:08.662 EDT &lt;span class=&quot;error&quot;&gt;&amp;#91;nioEventLoopGroup-11-1&amp;#93;&lt;/span&gt; WARN  o.o.o.protocol.impl.core.OFEncoder  - Message serialization failed&lt;br/&gt;
java.lang.NullPointerException: null&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory$2.make(TypeKeyMakerFactory.java:64) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.util.TypeKeyMakerFactory$2.make(TypeKeyMakerFactory.java:61) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.util.ListSerializer.serializeList(ListSerializer.java:38) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:52) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:31) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory.messageToBuffer(SerializationFactory.java:36) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:41) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:26) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:111) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.DefaultChannelHandlerContext.invokeWrite(DefaultChannelHandlerContext.java:666) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:724) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:659) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:645) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:878) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.AbstractChannel.write(AbstractChannel.java:231) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue.flush(ChannelOutboundQueue.java:189) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue.access$000(ChannelOutboundQueue.java:40) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowjava.protocol.impl.connection.ChannelOutboundQueue$1.run(ChannelOutboundQueue.java:84) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:341) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) &lt;span class=&quot;error&quot;&gt;&amp;#91;bundlefile:4.0.19.Final&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at java.lang.Thread.run(Thread.java:745) &lt;span class=&quot;error&quot;&gt;&amp;#91;na:1.7.0_65&amp;#93;&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;When I applied the following patch, the above NPE didn&apos;t occur.&lt;/p&gt;

&lt;p&gt;diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java&lt;br/&gt;
index 4938e41..541ef92 100644&lt;br/&gt;
&amp;#8212; a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java&lt;br/&gt;
+++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java&lt;br/&gt;
@@ -359,7 +359,7 @@ public final class ActionConvertor {&lt;br/&gt;
         if (version == OFConstants.OFP_VERSION_1_0) &lt;/p&gt;
{
             // if client configure openflow 1.0 switch as a openflow 1.3 switch using openflow 1.3 instructions
             // then we can ignore PUSH_VLAN as set-vlan-id will push a vlan header if not present
-            return emtpyAction(actionBuilder);
+            return null;
         }

&lt;p&gt;         PushVlanActionCase pushVlanActionCase = (PushVlanActionCase) action;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27529">OPNFLWPLUG-261</key>
            <summary>NullPointerException occurred when a MD-SAL flow has a push-vlan action</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="michal.rehak">Michal Rehak</assignee>
                                    <reporter username="Hideyuki1985">Hideyuki Tai</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Sep 2014 01:11:41 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:18 +0000</updated>
                            <resolved>Thu, 11 Sep 2014 07:30:33 +0000</resolved>
                                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="56069" author="mirehak@cisco.com" created="Fri, 5 Sep 2014 09:33:27 +0000"  >&lt;p&gt;Source of the NPE is in ActionConvertor in OFPlugin. Sanitizing NPE in OFJava can introduce performance regression and will never clearly explain the cause as OFJava receives corrupted data.&lt;/p&gt;</comment>
                            <comment id="56070" author="mirehak@cisco.com" created="Wed, 10 Sep 2014 18:05:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/11006/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/11006/&lt;/a&gt;&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>1713</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=1713]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10303"><![CDATA[Helium-RC1]]></customfieldvalue>

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

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