Re: [PATCH conntrack-tools] conntrack: introduce --labelmap option to specify connlabel.conf path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Heiss <c.heiss@xxxxxxxxxxx> wrote:
> But it's used for indexing into `optflags`, which in turned is used by
> generic_opt_check().
> 
> As `--labelmap` can only be used with `--label{-add,-del}` and thus
> `-L`, `-E`, `-U` and `-D`, this is appropriately reflected in
> `commands_v_options`.
> 
> Based on that, generic_opt_check() will then throw an error/abort if
> `--labelmap` is used with any other command, e.g.:
> 
>   conntrack v1.4.8 (conntrack-tools): Illegal option `--labelmap' with this command
>   Try `conntrack -h' or 'conntrack --help' for more information.

Makes sense, thanks.

> > Should this exit() if labelmap_path != NULL?
> 
> Don't have a strong preference on this, but probably makes sense to
> abort in case the user ever specifies the option multiple times. I'll
> add that.

Thanks!

> Can do that. Will just entail a bit more refactoring around the
> --label{-add,-del} option parsing, as that relies on an already
> initialized labelmap.

Right, if this becomes too convoluted then another alternative
is to error out if the --labelmap option is seen but the initalisation
was already done with an error message indicating that the labelmap
option must come first.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux