diff options
| author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2015-05-27 10:16:43 -0400 |
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2015-05-28 00:23:31 -0400 |
| commit | cd5279c194f89c9b97c294af4aaf4ea8c5e3c704 (patch) | |
| tree | f591028fd9acc2914fd7470f2f4ba7e5f0f6377c /net/ipv4 | |
| parent | 407d34ef294727bdc200934c38d9a8241f4a5547 (diff) | |
ip_vti/ip6_vti: Do not touch skb->mark on xmit
Instead of modifying skb->mark we can simply modify the flowi_mark that is
generated as a result of the xfrm_decode_session. By doing this we don't
need to actually touch the skb->mark and it can be preserved as it passes
out through the tunnel.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/ip_vti.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 9f7269f3c54a..4c318e1c13c8 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c | |||
| @@ -216,8 +216,6 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 216 | 216 | ||
| 217 | memset(&fl, 0, sizeof(fl)); | 217 | memset(&fl, 0, sizeof(fl)); |
| 218 | 218 | ||
| 219 | skb->mark = be32_to_cpu(tunnel->parms.o_key); | ||
| 220 | |||
| 221 | switch (skb->protocol) { | 219 | switch (skb->protocol) { |
| 222 | case htons(ETH_P_IP): | 220 | case htons(ETH_P_IP): |
| 223 | xfrm_decode_session(skb, &fl, AF_INET); | 221 | xfrm_decode_session(skb, &fl, AF_INET); |
| @@ -233,6 +231,9 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 233 | return NETDEV_TX_OK; | 231 | return NETDEV_TX_OK; |
| 234 | } | 232 | } |
| 235 | 233 | ||
| 234 | /* override mark with tunnel output key */ | ||
| 235 | fl.flowi_mark = be32_to_cpu(tunnel->parms.o_key); | ||
| 236 | |||
| 236 | return vti_xmit(skb, dev, &fl); | 237 | return vti_xmit(skb, dev, &fl); |
| 237 | } | 238 | } |
| 238 | 239 | ||
