<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:13:51 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>[BGPCEP-695] NPE when next-hop attribute is empty</title>
                <link>https://jira.opendaylight.org/browse/BGPCEP-695</link>
                <project id="10108" key="BGPCEP">bgpcep</project>
                    <description>&lt;p&gt;When the next-hop value is put as empty value in flowspec, a NPE will be thrown.&lt;/p&gt;

&lt;p&gt;next-hop attribute is a mandatory attribute in BGP update message.  However, it could have zero length in flowspec. ODL is not handling the zero-length case properly.&lt;/p&gt;

&lt;p&gt;Related issue:&lt;br/&gt;
&lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=5791&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=5791&lt;/a&gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23935">BGPCEP-695</key>
            <summary>NPE when next-hop attribute is empty</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="cdgasparini">Claudio David Gasparini</assignee>
                                    <reporter username="kevinxw">Kevin Wang</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Oct 2017 18:02:51 +0000</created>
                <updated>Tue, 20 Jul 2021 10:47:16 +0000</updated>
                            <resolved>Tue, 20 Jul 2021 10:47:16 +0000</resolved>
                                    <version>Bugzilla Migration</version>
                                    <fixVersion>Sodium</fixVersion>
                                    <component>BGP</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="46296" author="kevixw@gmail.com" created="Tue, 10 Oct 2017 18:02:51 +0000"  >&lt;p&gt;Attachment karaf.log.zip has been added with description: karaf log&lt;/p&gt;</comment>
                            <comment id="46295" author="kevixw@gmail.com" created="Tue, 10 Oct 2017 21:28:58 +0000"  >&lt;p&gt;Waiting for review: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/64129/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/64129/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="59769" author="cdgasparini" created="Tue, 24 Oct 2017 14:50:06 +0000"  >&lt;p&gt;Hi Kevin, this an specific case for flowspec, please add the&lt;br/&gt;
reference to the draft/RFC mentioning it to the commit.&lt;br/&gt;
Also you should be updating nexhop handlers for flowspec only&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/BGPActivator.java;h=d15246bc1060e000b6092b389e03855bbe0aa510;hb=refs/heads/master&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/BGPActivator.java;h=d15246bc1060e000b6092b389e03855bbe0aa510;hb=refs/heads/master&lt;/a&gt;.&lt;br/&gt;
&amp;gt;&lt;br/&gt;
Also add some test coverage for this case.&lt;br/&gt;
&amp;gt;&lt;br/&gt;
Regards&lt;br/&gt;
Hi Claudio,I think the problem is we should prevent such case from happening&lt;br/&gt;
in RESTCONF.  If next-hop is required and user submit a RESTCONF&lt;br/&gt;
request with empty next-hop, the cohort should return an exception&lt;br/&gt;
immediate.Another thing is, we find that if user put &amp;lt;ipv4-next-hop&amp;gt;8.8.8.8&amp;lt;/ipv4-next-hop&amp;gt;&lt;br/&gt;
in the payload, there is no error to be returned either. However,&lt;br/&gt;
&amp;lt;ipv4-next-hop&amp;gt;&amp;lt;global&amp;gt;8.8.8.8&amp;lt;/global&amp;gt;&amp;lt;/ipv4-next-hop&amp;gt; is the&lt;br/&gt;
correct format.So we need either add a mdsal cohort checking for these sort of&lt;br/&gt;
thing (don&apos;t think we have such checking in bgp yet), or change the&lt;br/&gt;
yang model to make these field mandatory&lt;/p&gt;</comment>
                            <comment id="59770" author="cdgasparini" created="Tue, 24 Oct 2017 15:02:43 +0000"  >&lt;p&gt;Hi Kevin,&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the patch is abandoned since we agree that is not the correct solution.&lt;/li&gt;
	&lt;li&gt;regarding the issue of pushing  ipv4-next-hop against ipv4-next-hop/global, if you consider that it shouldn&apos;t work please open a bug for RESTCONF so the issue doesn&apos;t get lost.&lt;/li&gt;
	&lt;li&gt;Making the next-hop mandatory in the yang model might be more complicated that it looks, its requires to check where is used the&lt;br/&gt;
updated model and if is correct to be mandatory on all the cases, etc.., anyway when you push the new fix, we can go through it again.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Claudio&lt;/p&gt;</comment>
                            <comment id="59790" author="kevixw@gmail.com" created="Wed, 25 Oct 2017 23:21:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=cdgasparini&quot; class=&quot;user-hover&quot; rel=&quot;cdgasparini&quot;&gt;cdgasparini&lt;/a&gt;,&lt;br/&gt;
Do we have any RESTCONF cohort checking in bgp project?&lt;br/&gt;
The best solution is to forbid user from injecting empty ipv4-next-hop from restconf.  It should be either ipv4-next-hop with a valid IP provided, or the element not appeared at all.  An empty element &amp;lt;ipv4-next-hop /&amp;gt; should not be allowed.&lt;br/&gt;
If there is such cohort framework exist already in bgp project that I can leverage it will be great.&lt;br/&gt;
Or if you have a better solution please let me know.&lt;/p&gt;

&lt;p&gt;The fundamental goal is to prevent invalid data from user input.  The flowspec handler can only ignore such invalid data without fixing it.  When flowspec handler is invoked, it&apos;s already at packet serialization stage.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13245" name="karaf.log.zip" size="110224" author="kevinxw" created="Tue, 10 Oct 2017 18:02:51 +0000"/>
                    </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>9265</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=9265]]></customfieldvalue>

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

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