summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_state.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 08:42:11 +0100
committerDavid S. Miller <davem@davemloft.net>2011-03-13 00:08:52 +0100
commit7e1dc7b6f709dfc1a9ab4b320dbe723f45992693 (patch)
treedb3a0ae07fb469c7f809a448bc39563f98edfec5 /net/ipv4/xfrm4_state.c
parentnet: Add flowi6_* member helper macros. (diff)
downloadlinux-7e1dc7b6f709dfc1a9ab4b320dbe723f45992693.tar.xz
linux-7e1dc7b6f709dfc1a9ab4b320dbe723f45992693.zip
net: Use flowi4 and flowi6 in xfrm layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_state.c')
-rw-r--r--net/ipv4/xfrm4_state.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
index d8d541954532..1717c64628d1 100644
--- a/net/ipv4/xfrm4_state.c
+++ b/net/ipv4/xfrm4_state.c
@@ -23,17 +23,19 @@ static int xfrm4_init_flags(struct xfrm_state *x)
static void
__xfrm4_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl)
{
- sel->daddr.a4 = fl->fl4_dst;
- sel->saddr.a4 = fl->fl4_src;
- sel->dport = xfrm_flowi_dport(fl, &fl->u.ip4.uli);
+ const struct flowi4 *fl4 = &fl->u.ip4;
+
+ sel->daddr.a4 = fl4->daddr;
+ sel->saddr.a4 = fl4->saddr;
+ sel->dport = xfrm_flowi_dport(fl, &fl4->uli);
sel->dport_mask = htons(0xffff);
- sel->sport = xfrm_flowi_sport(fl, &fl->u.ip4.uli);
+ sel->sport = xfrm_flowi_sport(fl, &fl4->uli);
sel->sport_mask = htons(0xffff);
sel->family = AF_INET;
sel->prefixlen_d = 32;
sel->prefixlen_s = 32;
- sel->proto = fl->flowi_proto;
- sel->ifindex = fl->flowi_oif;
+ sel->proto = fl4->flowi4_proto;
+ sel->ifindex = fl4->flowi4_oif;
}
static void