Improving qos_flows mark feature - obtaining mark later

From: Andrew Beverley <andy_at_andybev.com>
Date: Sun, 16 Oct 2011 23:23:23 +0100

Hi,

I've been using the qos_flows feature for preserving a netfilter mark,
but have run into some problems.

Currently, the netfilter mark for the connection is obtained in
forward.cc, during the stages of opening a connection to the remote
server. The problem with this is that the connection mark may change
once the reply is received.

So, I would like to move Ip::Qos::getNfmarkFromServer() from
FwdState::dispatch to a function that is called during the server reply
stage. However, I can't work out where it should go.

I've looked at moving it to client_side_reply.cc, but I can't find a way
to retrieve the remote server connection information. I've also looked
at comm_read() in comm.cc, but I can't find the client connection
information and it looks like the wrong place anyway.

Where is the best place to move it to, where it has access to both the
client and server side connection, but where it is late enough to read
the mark value if it changes during the server reply?

Hope this makes sense!

Thanks,

Andy
Received on Sun Oct 16 2011 - 22:23:32 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 17 2011 - 12:00:05 MDT