All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gaiarin <gaio@sv.lnf.it>
To: netfilter-devel@vger.kernel.org
Subject: Some help to fix 'ipac-ng', a iptables-based accounting software...
Date: Fri, 13 Feb 2015 16:57:05 +0100	[thread overview]
Message-ID: <20150213155705.GL3803@sv.lnf.it> (raw)


I'm a very dumb programmer and i know little C, so i feel some fear to
write here, but... i hope that someone here can take this as an
exercise. ;-)


I use by some year an accounting software called 'ipac-ng':

	http://ipac-ng.sourceforge.net/

substantially, that software add some ''no target'' rule via
libiptables, and an helper program extract counter from them, building
graphs.
It is not realtime nor (i think) byte-accurate, but it is really
'lightweight'' compared to libpcap alternatives.
Also, it is, ahem, in ''low maintenance mode''. ;)


Recently i've upgraded from debian squeeze (so, iptables 1.4.8-3) to
debian wheezy (so, iptables 1.4.14-3.1).
After that upgrade, 'fetchipac' (the main binary that add the rules and
extract data) start complaining about some extended parameters i use
(MAC match):

	fetchipac: unrecognized option '--mac-source'

and then sigsev.
If i remove the ''extended parameters'', all work as expected. But
clearly i need that.


I've asked in ipac-ng lists[1], and a developer confirm me that seems a
libiptables incompatibilites.
Pointed me also against the guilty .c file:

	http://ipac-ng.cvs.sourceforge.net/viewvc/ipac-ng/ipac-ng/agents/iptables/iptables.c?view=markup

where the most of the code are taken from iptables itself.
The function prepare_entry() on line 834 roughly mimic the iptables
command line parse (but only for the '-m' parameter!).

So i've taken the relevant iptables code from 1.4.8 and 1.4.14, diff
them and port back ipac-ng code[2].

I've reached the (for me, impressive! ;) result that the code compile
and does not sigsev anymore.
But still reply 'unrecognized option'. ;-(


Someone can help me? Thanks.


[1]: https://sourceforge.net/p/ipac-ng/mailman/ipac-ng-common/thread/20150205165940.GR3690%40sv.lnf.it/#msg33353346

[2]: my code on https://sourceforge.net/p/ipac-ng/mailman/message/33379160/

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2015-02-13 16:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150213155705.GL3803@sv.lnf.it \
    --to=gaio@sv.lnf.it \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.