|
@@ -695,9 +695,6 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
|
|
else
|
|
else
|
|
fl6->daddr = tunnel->parms.raddr;
|
|
fl6->daddr = tunnel->parms.raddr;
|
|
|
|
|
|
- if (tunnel->parms.o_flags & TUNNEL_SEQ)
|
|
|
|
- tunnel->o_seqno++;
|
|
|
|
-
|
|
|
|
/* Push GRE header. */
|
|
/* Push GRE header. */
|
|
protocol = (dev->type == ARPHRD_ETHER) ? htons(ETH_P_TEB) : proto;
|
|
protocol = (dev->type == ARPHRD_ETHER) ? htons(ETH_P_TEB) : proto;
|
|
|
|
|
|
@@ -720,14 +717,20 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
|
|
fl6->flowi6_uid = sock_net_uid(dev_net(dev), NULL);
|
|
fl6->flowi6_uid = sock_net_uid(dev_net(dev), NULL);
|
|
|
|
|
|
dsfield = key->tos;
|
|
dsfield = key->tos;
|
|
- flags = key->tun_flags & (TUNNEL_CSUM | TUNNEL_KEY);
|
|
|
|
|
|
+ flags = key->tun_flags &
|
|
|
|
+ (TUNNEL_CSUM | TUNNEL_KEY | TUNNEL_SEQ);
|
|
tunnel->tun_hlen = gre_calc_hlen(flags);
|
|
tunnel->tun_hlen = gre_calc_hlen(flags);
|
|
|
|
|
|
gre_build_header(skb, tunnel->tun_hlen,
|
|
gre_build_header(skb, tunnel->tun_hlen,
|
|
flags, protocol,
|
|
flags, protocol,
|
|
- tunnel_id_to_key32(tun_info->key.tun_id), 0);
|
|
|
|
|
|
+ tunnel_id_to_key32(tun_info->key.tun_id),
|
|
|
|
+ (flags | TUNNEL_SEQ) ? htonl(tunnel->o_seqno++)
|
|
|
|
+ : 0);
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
+ if (tunnel->parms.o_flags & TUNNEL_SEQ)
|
|
|
|
+ tunnel->o_seqno++;
|
|
|
|
+
|
|
gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
|
|
gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
|
|
protocol, tunnel->parms.o_key,
|
|
protocol, tunnel->parms.o_key,
|
|
htonl(tunnel->o_seqno));
|
|
htonl(tunnel->o_seqno));
|