On 09/27/2013 03:46 PM, Sassy Natan wrote: > > > ---------- Forwarded message ---------- > From: *Sassy Natan* <sas...@gmail.com <mailto:sas...@gmail.com>> > Date: Fri, Sep 27, 2013 at 11:20 PM > Subject: monthdays in rules > To: shorewall-users@lists.sourceforge.net > <mailto:shorewall-users@lists.sourceforge.net> > > > > Hi Group > > > I'm trying to configure a rule with a time condition > > this seems to work : > localtz×tart=20:00×top=20:10&weekdays=Mon,Tue,Wed,Thu,Fri > > Howerver, I can't manage to use the monthdays option. > > Based on the shorewall Documentation and this lnk > http://lxr.gwbnsh.net.cn/iptables+iptables-1.4.7/extensions/libxt_time.c > > monthdays value are a List of days (Possible days: 1 to 31; defaults to all) > separated by comma. > > > > When define a rule with @monthdays=1,11,22,25 for example Shorewall seems to > compile it, but in the iptables rule or (shorewall show) I don't see anything > related to the monthday. > > Trying to debug didn't help > > > Does any one can help? >
The attached patch should fix it for you (it does for me :-) ). -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 \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 1d4a9fd..44ac205 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -4916,6 +4916,7 @@ sub do_time( $ ) { for my $day ( split /,/, $days ) { fatal_error "Invalid day of the month ($day)" unless $day =~ /^\d{1,2}$/ && $day && $day <= 31; } + $result .= "--monthday $days "; } elsif ( $element =~ /^(datestart|datestop)=(\d{4}(-\d{2}(-\d{2}(T\d{1,2}(:\d{1,2}){0,2})?)?)?)$/ ) { $result .= "--$1 $2 "; } elsif ( $element =~ /^(utc|localtz|kerneltz)$/ ) {
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________ Shorewall-users mailing list Shorewall-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-users