Skip to content

Commit 42d5d33

Browse files
committed
ovsSwitch/ovsSwitch.go: fix {Add,Remove}Peer
Signed-off-by: Cristian Staretu <[email protected]>
1 parent aad4a20 commit 42d5d33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ovsSwitch/ovsSwitch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func (sw *OvsSwitch) DeleteEndpoint(intfName string) error {
272272
// AddPeer creates a VTEP interface
273273
func (sw *OvsSwitch) AddPeer(vtepIP string) error {
274274
// Setup VTEPs only in vxlan and vrouter mode
275-
if sw.netType != "vxlan" || sw.netType != "vrouter" {
275+
if sw.netType != "vxlan" && sw.netType != "vrouter" {
276276
return nil
277277
}
278278

@@ -311,7 +311,7 @@ func (sw *OvsSwitch) AddPeer(vtepIP string) error {
311311
// RemovePeer deletes a VTEP
312312
func (sw *OvsSwitch) RemovePeer(vtepIP string) error {
313313
// delete VTEPs only in vxlan and vrouter mode
314-
if sw.netType != "vxlan" || sw.netType != "vrouter" {
314+
if sw.netType != "vxlan" && sw.netType != "vrouter" {
315315
return nil
316316
}
317317

0 commit comments

Comments
 (0)