Skip to content

Commit

Permalink
ipcomp: assign if_id to child tunnel from parent tunnel
Browse files Browse the repository at this point in the history
The child tunnel if_id will be used for xfrm interface's lookup
when processing the IP(6)IP(6) packets in the next patches.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
Xin Long authored and Steffen Klassert committed Jul 9, 2020
1 parent 2ab110c commit d5a7a50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/ipcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x)
t->props.flags = x->props.flags;
t->props.extra_flags = x->props.extra_flags;
memcpy(&t->mark, &x->mark, sizeof(t->mark));
t->if_id = x->if_id;

if (xfrm_init_state(t))
goto error;
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ipcomp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x)
t->props.mode = x->props.mode;
memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr));
memcpy(&t->mark, &x->mark, sizeof(t->mark));
t->if_id = x->if_id;

if (xfrm_init_state(t))
goto error;
Expand Down

0 comments on commit d5a7a50

Please sign in to comment.