Bug 1394914

Summary: ovs fails to route or uses incorrect source address when a gateway is used
Product: Red Hat Enterprise Linux 7 Reporter: Thadeu Lima de Souza Cascardo <cascardo>
Component: openvswitchAssignee: Thadeu Lima de Souza Cascardo <cascardo>
Status: CLOSED CURRENTRELEASE QA Contact: Junhan <juyan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.3CC: aconole, atragler, fleitner, qding, rkhan, tredaelli
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-26 15:07:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Thadeu Lima de Souza Cascardo 2016-11-14 17:54:06 UTC
OVS picks pick up a source address for a route it detects from the system interfaces. When using the userspace datapath and setting up a tunnel, fail to detect such address may prevent the tunnel from being used.

This would happen when the destination address does not share an network with any of the source addresses for the outgoing interface.

For example, an interface with:

311: fakebr: <BROADCAST,PROMISC> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 72:80:39:c5:f8:47 brd ff:ff:ff:ff:ff:ff
    inet 172.16.100.2/24 scope global fakebr
       valid_lft forever preferred_lft forever

And route:

172.16.101.3 via 172.16.100.4 dev fakebr  src 172.16.100.2 
    cache 

would fail in the case our tunnel lies in 172.16.101.3 and the route has netmask 255.255.255.0.

This might not be the case always because OVS has a related bug in which it will use an incorrect netmask, because it does an incorrect dereference. So, reproducing this issue might not be easy.

Cascardo.

Comment 1 Thadeu Lima de Souza Cascardo 2016-11-14 17:59:42 UTC
I have patches prepared for this, it should be backported to 2.6.

I realized this code was different in 2.5, so it should not be affected. 2.5 had other drawbacks when multiple source addresses were present on the same interface.

Cascardo.

Comment 3 Thadeu Lima de Souza Cascardo 2016-11-16 12:35:41 UTC
This is an upstream bug, affected branches upstream have already been patched.

Cascardo.