[Snort-devel] Variables

Paul Ritchey pritchey at ...278...
Fri Jun 15 18:01:13 EDT 2001

I either need a confirmation of how it's supposed to work, or else there is a bug in Snort (lastest CVS, others not tested).

My understanding of the $(<blah>:-value) is that if the variable doesn't already have a value assigned to it, it will be assigned the default value in the ':-' statement.

Define a line like the following in your snort.conf file:
var HOME_NET $(HOME_NET:-any)

On the command line, add the option to define the value:
snort [other options as needed] -S HOME_NET=

If you do the above, the variable HOME_NET is defined as 'any'.

If you use the '-?' notation to print out an error message, the error message prints out every time, even if you've defined the variable from the command line.

My understanding is that the variable defined on the command line is supposed to override the value in the snort.conf file (the opposite from previous versions), so the above behavior doesn't seem correct.(?)

Paul R.
pritchey at ...278...

More information about the Snort-devel mailing list