summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-05-26 22:39:02 -0700
committerBen Pfaff <blp@ovn.org>2017-05-30 07:59:52 -0700
commit7d170821184c578e0146e3796ffc03e9bf0a0eba (patch)
tree3a96bc37a2eeb07cf59c4240bd1104ef053cb6d7 /ovn
parent51dd46474d2bf66d2c5bd044c3736c59479de5c1 (diff)
downloadopenvswitch-7d170821184c578e0146e3796ffc03e9bf0a0eba.tar.gz
ovn-northd: Avoid null deref for missing outport in build_static_route_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>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/northd/ovn-northd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 94bbe7c48..4d4930855 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -3966,7 +3966,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",