Skip to contentSkip to conversation

TCP_SKB_CB(skb)->flags = iph->tos ?

DISCUSSION Octavian Purdila 2 participants 3 messages May 30, 2008 – Jun 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

tcp_v4_rcv says: TCP_SKB_CB(skb)->flags = iph->tos;

I am probably missing something obvious, but shouldn't flags be initialized with the TCP headers instead of the IP TOS value?

Thanks,
tavi

maintainer
#1 lore raw

From: Octavian Purdila <[email protected]>
Date: Fri, 30 May 2008 23:53:56 +0300

Quoted 5 lines

tcp_v4_rcv says: TCP_SKB_CB(skb)->flags = iph->tos;

I am probably missing something obvious, but shouldn't flags be initialized with the TCP headers instead of the IP TOS value?

On packet output ->flags holds the TCP header flags, on packet input it holds the TOS field for testing ECN flags.

You could have had a look at how the ->flags field is used on TCP output vs. TCP input processing to get a better idea of what might be going on here.

That's exactly how I figured it out, I didn't know the answer either, but constantly I'm doing simple searches for people and learning the code for other people it seems even when I really don't even have the time to do so :-/

#2 lore raw
Quoted 6 lines

That's exactly how I figured it out, I didn't know the answer either, but constantly I'm doing simple searches for people and learning the code for other people it seems even when I really don't even have the time to do so :-/

Apologies, I did not pay attention to my grep output and was under the impression that ->flags is only used together with the TCP headers and that the ip->tos assignment was never used.

Thanks,
tavi