aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_vti.c5
-rw-r--r--net/ipv6/ip6_vti.c4
2 files changed, 6 insertions, 3 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
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index ed9d681207fa..104de4da3ff3 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -495,7 +495,6 @@ vti6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
495 int ret; 495 int ret;
496 496
497 memset(&fl, 0, sizeof(fl)); 497 memset(&fl, 0, sizeof(fl));
498 skb->mark = be32_to_cpu(t->parms.o_key);
499 498
500 switch (skb->protocol) { 499 switch (skb->protocol) {
501 case htons(ETH_P_IPV6): 500 case htons(ETH_P_IPV6):
@@ -516,6 +515,9 @@ vti6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
516 goto tx_err; 515 goto tx_err;
517 } 516 }
518 517
518 /* override mark with tunnel output key */
519 fl.flowi_mark = be32_to_cpu(t->parms.o_key);
520
519 ret = vti6_xmit(skb, dev, &fl); 521 ret = vti6_xmit(skb, dev, &fl);
520 if (ret < 0) 522 if (ret < 0)
521 goto tx_err; 523 goto tx_err;