This would trigger if someone tried to switch a dummy device between active and passive connections. It's not very important because dummy devices are only enabled during testing.
Found by LLVM scan-build. Reported-by: Kevin Lo <ke...@freebsd.org> Signed-off-by: Ben Pfaff <b...@nicira.com> --- lib/netdev-dummy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 24c91c2..6a1a308 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -342,13 +342,15 @@ dummy_packet_conn_set_config(struct dummy_packet_conn *conn, switch (conn->type) { case PASSIVE: - if (!strcmp(pstream_get_name(conn->u.pconn.pstream), pstream)) { + if (pstream && + !strcmp(pstream_get_name(conn->u.pconn.pstream), pstream)) { return; } dummy_packet_conn_close(conn); break; case ACTIVE: - if (!strcmp(stream_get_name(conn->u.rconn.rstream->stream), stream)) { + if (stream && + !strcmp(stream_get_name(conn->u.rconn.rstream->stream), stream)) { return; } dummy_packet_conn_close(conn); -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev