[ovs-dev] [PATCH] netdev: Open devices as the type specified.
alexw at nicira.com
Thu May 8 18:41:08 UTC 2014
FYI, Joe changed the implementation to:
Thanks for pointing this out, this actually reminds me of the similar issue
in another project.
On Thu, May 8, 2014 at 11:31 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, May 05, 2014 at 11:17:23AM +1200, Joe Stringer wrote:
> > Previously, it was possible to open a netdevice as one type, then
> > proceed to open it as a different type without first closing it. This
> > would result in the original device and netdev class being used rather
> > than the new one.
> > An example configuration that would previously give unexpected behaviour:
> > ovs-vsctl add-port br0 p0 -- set int p0 type=gre
> > ovs-vsctl add-port br0 p1 -- set int p1 type=internal
> > ovs-vsctl set int p1 type=gre options:remote_ip=184.108.40.206
> > ovs-vsctl set int p1 type=internal
> > The final command would report in the ovs-vswitchd logs that it is
> > attempting to configure the port with the same gre settings as p0,
> > despite the command specifying the type as internal.
> > This patch catches this case in netdev_open(), removes the old device
> > from the netdev shash and ensures that one with the new type is created.
> > Bug #1198386.
> > Signed-off-by: Joe Stringer <joestringer at nicira.com>
> I'm almost certain that this is going to trade one kind of unexpected
> behavior for a different one. For example, any call to
> netdev_get_in4_by_name() is now going to destroy a non-system device.
> dev mailing list
> dev at openvswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev