compat: Explicitly include net/ip.h in net/udp.h.
authorJoe Stringer <joestringer@nicira.com>
Wed, 11 Nov 2015 21:25:44 +0000 (13:25 -0800)
committerJoe Stringer <joestringer@nicira.com>
Mon, 23 Nov 2015 18:59:16 +0000 (10:59 -0800)
commitedc3afe2f1d011363213efb3840ab417d8130c5a
tree02bedade37535f6a247eceb104b75aef8b364e27
parentacb8cd9f433ba258fa290984dc16711c8a164373
compat: Explicitly include net/ip.h in net/udp.h.

The inet_get_local_port_range() function is defined as a 3-parameter
version in the backported net/ip.h, however some versions of RHEL7
kernel use the 2-parameter version in their net/udp.h header. We need to
make sure that our net/ip.h is first included, then undef our overriding
3-parameter version, include the system net/udp.h, then redefine our
overriding 3-parameter version so that it may be used inside OVS code.

This header needs to include net/ip.h here as some files may not include
it prior to net/udp.h, in which case the logic we have to define the
right version while including the system net/udp.h will not work.

Specifically this fixes issues on kernel 3.10.0-229.7.2.el7.x86_64
(perhaps earlier as well; some later versions make this unnecessary).

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/linux/compat/include/net/udp.h