Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
hi,
i'm working with the linux kernel, version 2.6.7.
i added an index to struct sock and i'm incrementing it in the function
tcp_transmit_skb every time a packet is being send.
when i'm debugging this function (by printing to /var/log/messages), i see
that there are two processes that send packets. as long as one process is
working alone, the index value is as expected but when another process is
interfering by generate the tcp_accept function, it gets (the secondd process) the value '0' to the index, which is ok, but when the first process returns to run it gets the value of the second index that just stopped running.
for example, process number 2016 is running, it visits tcp_transmit_skb 4 times so sk->index = 4. while it's in the function tcp_rcv_established, process number 1632 starts to run by generating tcp_accept (its sk->index=0, as expected), it visits tcp_transmit_skb 2 times and its sk->index become 2. now process number 2016 returns to run, i would expect that its sk->index will be 4 but unfortunately it's 2.
i'm checking sk->sk_socket->inode->i_uid for both processes and it's different (500 and 0).
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it. subscribe
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe