tcp: honor SO_PRIORITY in TIME_WAIT state
[linux-2.6-block.git] / net / ipv4 / ip_output.c
index cc7ef0d05bbd2baf4f4a1b8f9a8fe4f56b901f77..28fca408812c5576fc4ea957c1c4dec97ec8faf3 100644 (file)
@@ -499,7 +499,7 @@ int __ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        skb_dst_set_noref(skb, &rt->dst);
 
 packet_routed:
-       if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_gw_family)
+       if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_uses_gateway)
                goto no_route;
 
        /* OK, we know where to send it, allocate and build IP header. */
@@ -1266,6 +1266,7 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
        cork->length = 0;
        cork->ttl = ipc->ttl;
        cork->tos = ipc->tos;
+       cork->mark = ipc->sockc.mark;
        cork->priority = ipc->priority;
        cork->transmit_time = ipc->sockc.transmit_time;
        cork->tx_flags = 0;
@@ -1529,7 +1530,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
        }
 
        skb->priority = (cork->tos != -1) ? cork->priority: sk->sk_priority;
-       skb->mark = sk->sk_mark;
+       skb->mark = cork->mark;
        skb->tstamp = cork->transmit_time;
        /*
         * Steal rt from cork.dst to avoid a pair of atomic_inc/atomic_dec
@@ -1693,7 +1694,6 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
 
        inet_sk(sk)->tos = arg->tos;
 
-       sk->sk_priority = skb->priority;
        sk->sk_protocol = ip_hdr(skb)->protocol;
        sk->sk_bound_dev_if = arg->bound_dev_if;
        sk->sk_sndbuf = sysctl_wmem_default;