[Click] trouble live reconfiguration of IPClassifier

Eddie Kohler ekohler at gmail.com
Fri May 31 09:12:05 EDT 2013


Hi Momina,

My best guess is that you are calling reconfigure_keyword_handler()
incorrectly. reconfigure_keyword_handler() actually expects a STRING
argument, but the arguments to IPClassifier are POSITIONAL (i.e.
integers). For that you want reconfigure_positional_handler.

Since what you want seems like a useful feature (Meraki has something
like it), I've checked it in. IPClassifier now supports per-argument
reconfiguration handlers. If you look at this commit, you could
probably match to your code and fix your version.

https://github.com/kohler/click/commit/6ea8bf580d9276a477196d2517664b7925d3a763

Eddie


On Thu, May 30, 2013 at 3:21 AM, Momina Khan <momina.azam at gmail.com> wrote:
> Dear All
>
> Can someone plz help me do live reconfigure on IPClassifier. What i want to
> do is to change the configuration string i give to the IPClassifier while
> the router is live. I know that it relies on IPFilter element for all its
> functionality. So i call reconfigure_keyword_handler() in IPFilter when a
> timer fires but my computer halts with a Null Pointer exception ... some
> message about memo and click_lfree() ... can't paste the core dump as the
> computer halts.
>
> I have used the same handler to reconfigure other elements live but for the
> life of me i cannot decipher as to what is different about the IPFilter.
> Plz someone point me in the right direction!
>
> i did notice that for other config parameters the conf[argno] references a
> value that matches a keyword for instance a SimpleQueue has a CAPACITY
> keyword and its conf[argno] references to the numeric value of queue
> capacity. While in IPFilter conf[argno] references the entire string like
> "tcp && ttl > 0".
>
> are there any other fundamental differeneces i am missing!
>
>
>
> thank you!
> momina
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list