Bad comparison reported by Coverity in vr_nexthop.c

Bug #1739010 reported by Andrei Bunghez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
High
Andrei Bunghez
R4.0
New
High
Raghunandan Srinivasan
R4.1
Fix Committed
High
Andrei Bunghez
Trunk
Fix Committed
Undecided
Andrei Bunghez
OpenContrail
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Andrei Bunghez

Bug Description

Hi all,

OpenContrail 3.2
Coverity reports bad comparisons for the result of pkt_pull in vr_nexthop.c for nh_l2_rcv and nh_handle_mcast_control_pkt. This function returns a pointer which is checked to be below 0 in case of error. (56005,56010)

Regards,
Andrei

Tags: vrouter
description: updated
Changed in opencontrail:
status: New → In Progress
assignee: nobody → Andrei Bunghez (abunghez)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/38458
Submitter: Andrei Bunghez (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/38458
Committed: http://github.com/Juniper/contrail-vrouter/commit/fe9d4ad6830d8c34892908a94138b4e5305b0356
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit fe9d4ad6830d8c34892908a94138b4e5305b0356
Author: Andrei Bunghez <email address hidden>
Date: Tue Dec 19 13:53:30 2017 +0200

Coverity reports bad comparison for the result of pkt_pull

The result of pkt_pull is checked to be below 0 in case of error
(in nh_l2_rcv and nh_handle_mcast_control_pkt).
On the other hand, pkt_pull returns a pointer, which
makes the comparison pointless.

Change-Id: I1481a58a84f8872f05cf7bc4a045d1e41f6181d6
Closes-Bug: #1739010

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/40386
Submitter: Andrei Bunghez (<email address hidden>)

Revision history for this message
Hari Prasad Killi (haripk) wrote :

please also submit to master branch.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/40626
Submitter: Andrei Bunghez (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/40386
Committed: http://github.com/Juniper/contrail-vrouter/commit/a55f0754baf9e36304512c7fc325c67b481adc98
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit a55f0754baf9e36304512c7fc325c67b481adc98
Author: Andrei Bunghez <email address hidden>
Date: Tue Dec 19 13:53:30 2017 +0200

Coverity reports bad comparison for the result of pkt_pull

The result of pkt_pull is checked to be below 0 in case of error
(in nh_l2_rcv and nh_handle_mcast_control_pkt).
On the other hand, pkt_pull returns a pointer, which
makes the comparison pointless.

Change-Id: I1481a58a84f8872f05cf7bc4a045d1e41f6181d6
Closes-Bug: #1739010
(cherry picked from commit fe9d4ad6830d8c34892908a94138b4e5305b0356)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/40626
Committed: http://github.com/Juniper/contrail-vrouter/commit/08bff35390b34f0e2ef340435d6526c0b8234b89
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 08bff35390b34f0e2ef340435d6526c0b8234b89
Author: Andrei Bunghez <email address hidden>
Date: Tue Dec 19 13:53:30 2017 +0200

Coverity reports bad comparison for the result of pkt_pull

The result of pkt_pull is checked to be below 0 in case of error
(in nh_l2_rcv and nh_handle_mcast_control_pkt).
On the other hand, pkt_pull returns a pointer, which
makes the comparison pointless.

Change-Id: I1481a58a84f8872f05cf7bc4a045d1e41f6181d6
Closes-Bug: #1739010
(cherry picked from commit fe9d4ad6830d8c34892908a94138b4e5305b0356)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.