Hi, Is there a reason why connman does not use libiptc to change the iptables but has its own code to communicate with the kernel?
I am asking because I was looking into the fact that the iptables counters are reset when connman starts. I also looked into how the counters are handled by iptables-restore / iptables, which both use libiptc. Libiptc seems to contain quite some code to manage the counter values properly and it feels a bit like reinventing the wheel when doing pretty much the same in connman. Regards, Thiemo van Engelen > -----Original Message----- > From: connman [mailto:[email protected]] On Behalf Of Patrik Flykt > Sent: 10 April 2015 14:29 > To: [email protected] > Subject: Re: traffic counting, iptables and connman > > On Fri, 2015-04-03 at 13:47 +0000, Thiemo van Engelen wrote: > > Hi all, > > > > On our embedded linux device, I was trying to setup some ip traffic > > counting to specific ip addresses using iptables, but noticed that the > > counters were reset when connman (re)starts. > > Is this intended behaviour? > > No. There is a bug where ConnMan tries to save IP traffic counters after > it has removed the service. It also needs a bit more inspection to > ensure that the correct service gets assigned with the intended counter > values and not the next one we're switching to. For example when > switching from one WLAN to another where the same interface will be used > for the new service also. > > > If so, is there any method in connman that supports traffic counting > > to specific IP addresses? > > Specific IP addresses are not supported, counters are only per service. > > In the same go counter values should be updated to uint64. The API is > experimental, so we're not breaking any rules by changing its output. > Needs a bit of a warning sent out with the previous release notes, > though. > > Cheers, > > Patrik > > _______________________________________________ > connman mailing list > [email protected] > https://lists.connman.net/mailman/listinfo/connman _______________________________________________ connman mailing list [email protected] https://lists.connman.net/mailman/listinfo/connman
