Acked-by: Andy Zhou <[email protected]>
On Thu, Apr 16, 2015 at 2:38 PM, Ben Pfaff <[email protected]> wrote: > 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 <[email protected]> > Signed-off-by: Ben Pfaff <[email protected]> > --- > 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 > [email protected] > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
