From: "Steve \(Telsat Broadband\)" Date: Tue, 16 Sep 2014 23:15:34 +0000 Subject: Hook location of IMQ Message-Id: <3b7201cfd204$1e118300$5a348900$@telsatbb.vu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Hi All, I've posted a couple of questions over on linuximq.net but the discussion there seems quiet, so I'll try here to see if anyone here can point me in the right direction. Currently I use IMQ devices and TC to limit bandwidth to clients; this is all working very well, except that the byte counters I'm relying on for counting the clients data seems to be 'before' IMQ does its work. For example; I've got rules in the 'mangle/forward' table for assigning the clients data to the IMQ device and rules in the 'filter/forward' table which matches the client's data and I'm counting their traffic from here. However, according to this packet flow show on linuximq.net (http://www.docum.org/docum.org/kptd/) the IMQ hook is after 'POSTROUTING' which means that even though I'm using '-j IMQ' in the 'mangle/forward' table to limit the bandwidth before counting; the counters are still counting all packets; including dropped ones by IMQ. There doesn't seem to be any more 'chains' after the IMQ hook which I could rely upon to 'count' the data after IMQ has done its job. I realise that when compiling the kernel, I can choose where IMQ hooks in (before or after NAT); currently I have selected as 'AB'. What I'd like to know is; a) Is there something I'm missing; is there somewhere I can count the packets after IMQ's work is done? b) If not, is there some way I can modify the IMQ hook to be in-between the 'mangle/forward' and 'filter/forward' chains. Any help/comments are greatly appreciated. Thanks Steve.