ofproto-dpif: Fix up user specifying wrong bridge on "ofproto/trace".
authorBen Pfaff <blp@nicira.com>
Wed, 6 Mar 2013 00:48:21 +0000 (16:48 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 8 Mar 2013 18:26:56 +0000 (10:26 -0800)
commit6d19911609f659f6e582e53b1c0d4ffca16c0b80
tree680b446b9cefa7faa7cfd1c320097612dd9ec5b8
parent55599423a9ed7f42a8f48a55947bd4bc955e94e9
ofproto-dpif: Fix up user specifying wrong bridge on "ofproto/trace".

If there is more than one bridge, then it's easy to specify the wrong one
on an ofproto/trace command.  Previously, this would produce surprising
results.  With this commit, "ofproto/trace" should silently fix up the
problem.

It would be nice to not require the user to specify a bridge at all, but
it's theoretically possible to have more than one backer, in which case we
need some way to distinguish, and a bridge name is as good an identifier
as we have.  We could ask the user to specify the datapath_type, I guess,
but that's a less familiar name to most users and it would be a somewhat
gratuitous change in synatx for ofproto/trace.

Bug #15419.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c