<div dir="ltr">Hey Ben,<div><br></div><div>FYI, Joe changed the implementation to: <a href="http://openvswitch.org/pipermail/dev/2014-May/039790.html">http://openvswitch.org/pipermail/dev/2014-May/039790.html</a><br></div>

<div><br></div><div>Thanks for pointing this out, this actually reminds me of the similar issue in another project.</div><div><br></div><div>Thanks,</div><div>Alex Wang,</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Thu, May 8, 2014 at 11:31 AM, Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@nicira.com" target="_blank">blp@nicira.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On Mon, May 05, 2014 at 11:17:23AM +1200, Joe Stringer wrote:<br>
&gt; Previously, it was possible to open a netdevice as one type, then<br>
&gt; proceed to open it as a different type without first closing it. This<br>
&gt; would result in the original device and netdev class being used rather<br>
&gt; than the new one.<br>
&gt;<br>
&gt; An example configuration that would previously give unexpected behaviour:<br>
&gt;<br>
&gt; ovs-vsctl add-port br0 p0 -- set int p0 type=gre options:remote_ip=1.2.3.4<br>
&gt; ovs-vsctl add-port br0 p1 -- set int p1 type=internal<br>
&gt; ovs-vsctl set int p1 type=gre options:remote_ip=1.2.3.4<br>
&gt; ovs-vsctl set int p1 type=internal<br>
&gt;<br>
&gt; The final command would report in the ovs-vswitchd logs that it is<br>
&gt; attempting to configure the port with the same gre settings as p0,<br>
&gt; despite the command specifying the type as internal.<br>
&gt;<br>
&gt; This patch catches this case in netdev_open(), removes the old device<br>
&gt; from the netdev shash and ensures that one with the new type is created.<br>
&gt;<br>
&gt; Bug #1198386.<br>
&gt;<br>
&gt; Signed-off-by: Joe Stringer &lt;<a href="mailto:joestringer@nicira.com">joestringer@nicira.com</a>&gt;<br>
<br>
</div>I&#39;m almost certain that this is going to trade one kind of unexpected<br>
behavior for a different one.  For example, any call to<br>
netdev_get_in4_by_name() is now going to destroy a non-system device.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
<a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</div></div></blockquote></div><br></div>