Re: [PATCH nft v7 2/2] meta: Introduce new conditions 'time', 'day' and 'hour'

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

 



Ander Juaristi <a@xxxxxxxxxxxx> wrote:
> These keywords introduce new checks for a timestamp, an absolute date (which is converted to a timestamp),
> an hour in the day (which is converted to the number of seconds since midnight) and a day of week.

This patch breaks test case:

ip6/sets.t: ERROR: line 11: add set ip6 test-ip6 z { type time; }: I cannot add the set z

Fix appears to be:

     4  diff --git a/src/parser_bison.y b/src/parser_bison.y
     5  index 4b953029..088a857b 100644
     6  --- a/src/parser_bison.y
     7  +++ b/src/parser_bison.y
     8  @@ -1828,6 +1828,11 @@ data_type_atom_expr      :       type_identifier
     9                                                           dtype->size, NULL);
    10                                  xfree($1);
    11                          }
    12  +                       |       TIME
    13  +                       {
    14  +                               $$ = constant_expr_alloc(&@1, &time_type, time_type.byteorder,
    15  +                                                        time_type.size, NULL);
    16  +                       }
    17                          ;
    18

i.e., the test case breaks because "time" is now a keyword, so we need
to tell the datatype parsing part that TIME is also a type.

Other than this, I found no other problems.



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

  Powered by Linux