]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-zph.patch
- new from http://zph.bratcheda.org/
[packages/kernel.git] / kernel-zph.patch
1 diff -Nur linux-2.6.25/include/net/inet_sock.h linux-2.6.25-zph/include/net/inet_sock.h
2 --- linux-2.6.25/include/net/inet_sock.h        2008-04-16 21:49:44.000000000 -0500
3 +++ linux-2.6.25-zph/include/net/inet_sock.h    2008-04-23 10:14:10.000000000 -0500
4 @@ -142,6 +142,7 @@
5                 __be32                  addr;
6                 struct flowi            fl;
7         } cork;
8 +       __u8                    zph_tos;        /* ZPH TOS received on connect */ 
9  };
10  
11  #define IPCORK_OPT     1       /* ip-options has been held in ipcork.opt */
12 diff -Nur linux-2.6.25/net/ipv4/ip_sockglue.c linux-2.6.25-zph/net/ipv4/ip_sockglue.c
13 --- linux-2.6.25/net/ipv4/ip_sockglue.c 2008-04-16 21:49:44.000000000 -0500
14 +++ linux-2.6.25-zph/net/ipv4/ip_sockglue.c     2008-04-23 10:15:17.000000000 -0500
15 @@ -1120,6 +1120,10 @@
16                         int hlim = inet->mc_ttl;
17                         put_cmsg(&msg, SOL_IP, IP_TTL, sizeof(hlim), &hlim);
18                 }
19 +               if (inet->cmsg_flags&IP_CMSG_TOS) {
20 +                       int hlim = inet->zph_tos;
21 +                       put_cmsg(&msg, SOL_IP, IP_TOS, sizeof(hlim), &hlim);
22 +                }
23                 len -= msg.msg_controllen;
24                 return put_user(len, optlen);
25         }
26 diff -Nur linux-2.6.25/net/ipv4/tcp_input.c linux-2.6.25-zph/net/ipv4/tcp_input.c
27 --- linux-2.6.25/net/ipv4/tcp_input.c   2008-04-16 21:49:44.000000000 -0500
28 +++ linux-2.6.25-zph/net/ipv4/tcp_input.c       2008-04-23 10:16:35.000000000 -0500
29 @@ -4883,6 +4883,8 @@
30  {
31         struct tcp_sock *tp = tcp_sk(sk);
32         struct inet_connection_sock *icsk = inet_csk(sk);
33 +       struct inet_sock *inet = inet_sk(sk);
34 +       struct iphdr *iph = ip_hdr(skb);
35         int saved_clamp = tp->rx_opt.mss_clamp;
36  
37         tcp_parse_options(skb, &tp->rx_opt, 0);
38 @@ -4941,6 +4943,12 @@
39  
40                 TCP_ECN_rcv_synack(tp, th);
41  
42 +               /* ZPH:
43 +                * Copy TOS field from the SYNACK packet to zph_tos field
44 +                * of the af_inet member of sock structure
45 +                */
46 +               inet->zph_tos = iph->tos;
47 +
48                 tp->snd_wl1 = TCP_SKB_CB(skb)->seq;
49                 tcp_ack(sk, skb, FLAG_SLOWPATH);
This page took 0.073404 seconds and 3 git commands to generate.