aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index c06883bf620e..61339e17a0f5 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -322,6 +322,13 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *
322 x->props.family = p->family; 322 x->props.family = p->family;
323 memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); 323 memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr));
324 x->props.flags = p->flags; 324 x->props.flags = p->flags;
325
326 /*
327 * Set inner address family if the KM left it as zero.
328 * See comment in validate_tmpl.
329 */
330 if (!x->sel.family)
331 x->sel.family = p->family;
325} 332}
326 333
327/* 334/*