libipq, open sockets stalling the app
Hi!
I'm using libipq and ip_queue with the QUEUE target to redirect packages. Basically I intercept the packages, rewrite the destination IP and ACCEPT the package.
My question is, during the running of the app 'lsof | grep root' show theres building up open sockets to the resource limit and then the app stops working. I havent been able to pinpoint the problem but it seems like its in libipq.
Does anyone know what this is? Am I missing out on the code somewhere and have a loose end maybe?
Jørn Andre
Hi!
Just wanted to apologize for this. It was my own bug since I hadnt closed a socket when I used ioctl and SIOCGIFNETMASK to get information from the ethernet card. libipq works just splendid!
I'm now using libipq to semi-tunnel tcp connections using a host and a 'fake' gw which then routes the packets independent of the 'route' gw (except for icmp and udp traffic which goes by the gw in the route). The whole thing is for the Olsr protocol since it changes gateway after 'topology and its whereabouts' rather than using static gw. This way a host can be told of (via broadcast) any possible gateways and choose which one to use for its tcp-connections, independently of the default gw. The nice thing with this is the load balancing effect possible between multiple gateways if this is wanted.
BTW, Netfilter is a beautiful piece of software!
Jørn Andre
Quoting Jørn Andre Nese Berntzen <[email protected]>:
Quoted 12 lines
Hi!
I'm using libipq and
ip_queuewith the QUEUE target to redirect packages. Basically I intercept the packages, rewrite the destination IP and ACCEPT the package.My question is, during the running of the app 'lsof | grep root' show theres building up open sockets to the resource limit and then the app stops working. I havent been able to pinpoint the problem but it seems like its in libipq.
Quoted 5 lines
Does anyone know what this is? Am I missing out on the code somewhere and have a loose end maybe?
Jørn Andre
--