diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-09-27 02:20:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-27 02:20:08 -0400 |
commit | b82d1bb4fd206ed305f9e955eeffc4a678149442 (patch) | |
tree | b0790dcc52f9b070e0b646eb6c0b7a16ac8c4a1a /net/ipv4 | |
parent | 3f192795cf1a0098df7bd655f7a72eee26bd63c3 (diff) | |
download | op-kernel-dev-b82d1bb4fd206ed305f9e955eeffc4a678149442.zip op-kernel-dev-b82d1bb4fd206ed305f9e955eeffc4a678149442.tar.gz |
tcp: unalias tcp_skb_cb flags and ip_dsfield
struct tcp_skb_cb contains a "flags" field containing either tcp flags
or IP dsfield depending on context (input or output path)
Introduce ip_dsfield to make the difference clear and ease maintenance.
If later we want to save space, we can union flags/ip_dsfield
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5a4408c..7008fcc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -222,7 +222,7 @@ static inline void TCP_ECN_check_ce(struct tcp_sock *tp, const struct sk_buff *s if (!(tp->ecn_flags & TCP_ECN_OK)) return; - switch (TCP_SKB_CB(skb)->flags & INET_ECN_MASK) { + switch (TCP_SKB_CB(skb)->ip_dsfield & INET_ECN_MASK) { case INET_ECN_NOT_ECT: /* Funny extension: if ECT is not set on a segment, * and we already seen ECT on a previous segment, diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index c29912c..dd3fad9 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1677,7 +1677,7 @@ int tcp_v4_rcv(struct sk_buff *skb) skb->len - th->doff * 4); TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); TCP_SKB_CB(skb)->when = 0; - TCP_SKB_CB(skb)->flags = iph->tos; + TCP_SKB_CB(skb)->ip_dsfield = ipv4_get_dsfield(iph); TCP_SKB_CB(skb)->sacked = 0; sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); |