Bug 1394914 - ovs fails to route or uses incorrect source address when a gateway is used
Summary: ovs fails to route or uses incorrect source address when a gateway is used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openvswitch
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Thadeu Lima de Souza Cascardo
QA Contact: Junhan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-14 17:54 UTC by Thadeu Lima de Souza Cascardo
Modified: 2017-11-07 01:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-26 15:07:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.