Skip to content

Commit

Permalink
ovn-northd: Avoid null deref for missing outport in build_static_rout…
Browse files Browse the repository at this point in the history
…e_flow().

Found by Coverity.

Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763080&defectInstanceId=4305186&mergedDefectId=179788
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Miguel Angel Ajo <majopela@redhat.com>
  • Loading branch information
blp committed May 30, 2017
1 parent f967932 commit 1e26040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovn/northd/ovn-northd.c
Expand Up @@ -3255,7 +3255,7 @@ build_static_route_flow(struct hmap *lflows, struct ovn_datapath *od,
}
}

if (!lrp_addr_s) {
if (!out_port || !lrp_addr_s) {
/* There is no matched out port. */
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "No path for static route %s; next hop %s",
Expand Down

0 comments on commit 1e26040

Please sign in to comment.