mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
Steffen Klassert says:
====================
1) Allow to avoid copying DSCP during encapsulation
by setting a SA flag. From Nicolas Dichtel.
2) Constify the netlink dispatch table, no need to modify it
at runtime. From Mathias Krause.
====================
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
commit
16e3d9648a
7 changed files with 32 additions and 6 deletions
|
|
@ -75,6 +75,7 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x)
|
|||
t->props.mode = x->props.mode;
|
||||
t->props.saddr.a4 = x->props.saddr.a4;
|
||||
t->props.flags = x->props.flags;
|
||||
t->props.extra_flags = x->props.extra_flags;
|
||||
memcpy(&t->mark, &x->mark, sizeof(t->mark));
|
||||
|
||||
if (xfrm_init_state(t))
|
||||
|
|
|
|||
|
|
@ -103,8 +103,12 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
|
|||
|
||||
top_iph->protocol = xfrm_af2proto(skb_dst(skb)->ops->family);
|
||||
|
||||
/* DS disclosed */
|
||||
top_iph->tos = INET_ECN_encapsulate(XFRM_MODE_SKB_CB(skb)->tos,
|
||||
/* DS disclosing depends on XFRM_SA_XFLAG_DONT_ENCAP_DSCP */
|
||||
if (x->props.extra_flags & XFRM_SA_XFLAG_DONT_ENCAP_DSCP)
|
||||
top_iph->tos = 0;
|
||||
else
|
||||
top_iph->tos = XFRM_MODE_SKB_CB(skb)->tos;
|
||||
top_iph->tos = INET_ECN_encapsulate(top_iph->tos,
|
||||
XFRM_MODE_SKB_CB(skb)->tos);
|
||||
|
||||
flags = x->props.flags;
|
||||
|
|
|
|||
Loading…
Reference in a new issue