datapath: Avoid confusing tunnels that have different types.
authorBen Pfaff <blp@nicira.com>
Fri, 14 Oct 2011 21:33:11 +0000 (14:33 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 17 Oct 2011 15:59:44 +0000 (08:59 -0700)
commit004cce23a6223a1fc062ff1fd3948de83742bc9c
tree4d4f8ea9ad8d85cb779837cbd33423a66591b8ce
parent681f040ea84a4283635654c4fbe6060cd6153fd8
datapath: Avoid confusing tunnels that have different types.

Without this change, the following commands succeed:
    # ovs-dpctl add-if br1 gre1,type=gre,remote_ip=1.2.3.4,local_ip=2.3.4.5
    # ovs-dpctl add-if br1 gre0,type=gre,remote_ip=1.2.3.4
but if they are run in the opposite order, they fail with:
    ovs-dpctl: adding gre1 to br1 failed (File exists)

This fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/tunnel.c