Re: [PATCH v4 2/2] netfilter: nft_meta: support for time matching

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

 



Florian Westphal <fw@xxxxxxxxx> wrote:
> Ander Juaristi <a@xxxxxxxxxxxx> wrote:
> > +++ b/net/netfilter/nft_meta.c
> > @@ -28,6 +28,27 @@
> >  
> >  static DEFINE_PER_CPU(struct rnd_state, nft_prandom_state);
> >  
> > +static u8 nft_meta_weekday(unsigned long secs)
> > +{
> > +	u8 wday;
> > +	unsigned int dse;
> > +
> > +	secs -= 60 * sys_tz.tz_minuteswest;
> > +	dse = secs / 86400;
> 
> This will probably fail to compile (link) on 32bit arches.
> You need to use do_div() here.

Scratch that, this will work fine (unsigned long is not a 64 bit
type in that case).



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

  Powered by Linux