diff options
| author | Simon Horman <horms@verge.net.au> | 2011-03-31 16:32:07 +0900 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2011-03-31 12:28:00 -0700 |
| commit | ac1e8ee90853b5d248ea5d2d0f63ce0b5686a5b7 (patch) | |
| tree | 527ed79f06b4206b8ba950ee689e1386b08d94ac /datapath | |
| parent | 7ecb095d0bf4940406ce684c5c6d5c7adac4cf77 (diff) | |
| download | openvswitch-ac1e8ee90853b5d248ea5d2d0f63ce0b5686a5b7.tar.gz | |
datapath: Update for changes in 2.6.39-rc1
Update for flowi4 and ip_route_output_flow() changes
in 2.6.39-rc1.
Signed-off-by: Simon Horman <horms@verge.net.au>
[Jesse: drop redundant unlikely() from IS_ERR()]
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath')
| -rw-r--r-- | datapath/tunnel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 7863b7a35..899d1cdcb 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -991,6 +991,7 @@ static struct rtable *find_route(struct vport *vport, return cur_cache->rt; } else { struct rtable *rt; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) struct flowi fl = { .nl_u = { .ip4_u = { .daddr = mutable->daddr, .saddr = mutable->saddr, @@ -999,6 +1000,16 @@ static struct rtable *find_route(struct vport *vport, if (unlikely(ip_route_output_key(&init_net, &rt, &fl))) return NULL; +#else + struct flowi4 fl = { .daddr = mutable->daddr, + .saddr = mutable->saddr, + .flowi4_tos = tos, + .flowi4_proto = tnl_vport->tnl_ops->ipproto }; + + rt = ip_route_output_key(&init_net, &fl); + if (IS_ERR(rt)) + return NULL; +#endif if (likely(tos == mutable->tos)) *cache = build_cache(vport, mutable, rt); |
