On 04/08/2013 07:41 AM, Mr Dash Four wrote: > >> I don't know much about perl (as you know), but is there a notion for >> a "quoted string" in it? In other words, only consider spaces if they >> are not quoted (allowing for escaping, in other words "something >> else", as well as "\"and so on"). If there isn't such functionality >> built-in, then you can devise it as a separate function so that every >> bit of "string" during the parsing process is passed through that >> function first and then you can break it into tokens. At least that is >> how I will do it in C. > Alternatively (if the above is a bit difficult to do), you may consider > the following, which may be less difficult to process: > > INLINE <src> <dst> # -m <match 1> -m <match 2> ... -j ACCEPT > > That way, you just parse the src and dst to determine the chain in which > to insert the inline statement ('src' or 'dst' should not contain > anything other that a zone, mind!) and then take whatever is after the > '#' character and include it after the '-A <chain>' statement. Would > that be easier?
I was thinking about that as well, and it would indeed be easier. How about this: ACCEPT <src> <dst> ; MATCH -m <match 1> -m <match 2> ... The preprocessor already looks for ';' and the MATCH keyword would trigger the new interpretation of the text that follows. I would prefer to keep the rule target (the '-j ...' part) in the ACTION column if possible. -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________ Shorewall-devel mailing list Shorewall-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-devel