Print this page
OS-7667 IPFilter needs to keep and report state for cloud firewall logging
Portions contributed by: Mike Gerdts <mike.gerdts@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ipf/tools/ipnat_y.y
          +++ new/usr/src/cmd/ipf/tools/ipnat_y.y
   1    1  %{
   2    2  /*
   3    3   * Copyright (C) 2001-2008 by Darren Reed.
   4    4   *
   5    5   * See the IPFILTER.LICENCE file for details on licencing.
   6    6   *
   7    7   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
   8    8   * Use is subject to license terms.
        9 + * Copyright 2019 Joyent, Inc.
   9   10   */
  10   11  
  11   12  #pragma ident   "%Z%%M% %I%     %E% SMI"
  12   13  
  13   14  #ifdef  __FreeBSD__
  14   15  # ifndef __FreeBSD_cc_version
  15   16  #  include <osreldate.h>
  16   17  # else
  17   18  #  if __FreeBSD_cc_version < 430000
  18   19  #   include <osreldate.h>
↓ open down ↓ 13 lines elided ↑ open up ↑
  32   33  #include <sys/file.h>
  33   34  #include <stdlib.h>
  34   35  #include <stddef.h>
  35   36  #include <sys/socket.h>
  36   37  #include <sys/ioctl.h>
  37   38  #include <netinet/in.h>
  38   39  #include <netinet/in_systm.h>
  39   40  #include <sys/time.h>
  40   41  #include <syslog.h>
  41   42  #include <net/if.h>
       43 +#include <uuid/uuid.h>
  42   44  #if __FreeBSD_version >= 300000
  43   45  # include <net/if_var.h>
  44   46  #endif
  45   47  #include <netdb.h>
  46   48  #include <arpa/nameser.h>
  47   49  #include <resolv.h>
  48   50  #include "ipf.h"
  49   51  #include "netinet/ipl.h"
  50   52  #include "ipnat_l.h"
  51   53  
↓ open down ↓ 30 lines elided ↑ open up ↑
  82   84                  u_short p1;
  83   85                  u_short p2;
  84   86                  int     pc;
  85   87          } pc;
  86   88          struct  {
  87   89                  i6addr_t        a;
  88   90                  i6addr_t        m;
  89   91                  int     v;
  90   92          } ipp;
  91   93          union   i6addr  ip6;
       94 +        uuid_t  uuid;
  92   95  };
  93   96  
  94   97  %token  <num>   YY_NUMBER YY_HEX
  95   98  %token  <str>   YY_STR
  96   99  %token    YY_COMMENT 
  97  100  %token    YY_CMP_EQ YY_CMP_NE YY_CMP_LE YY_CMP_GE YY_CMP_LT YY_CMP_GT
  98  101  %token    YY_RANGE_OUT YY_RANGE_IN
  99  102  %token  <ip6>   YY_IPV6
      103 +%token  <uuid>  YY_UUID
 100  104  
 101  105  %token  IPNY_MAPBLOCK IPNY_RDR IPNY_PORT IPNY_PORTS IPNY_AUTO IPNY_RANGE
 102  106  %token  IPNY_MAP IPNY_BIMAP IPNY_FROM IPNY_TO IPNY_MASK IPNY_PORTMAP IPNY_ANY
 103  107  %token  IPNY_ROUNDROBIN IPNY_FRAG IPNY_AGE IPNY_ICMPIDMAP IPNY_PROXY
 104  108  %token  IPNY_TCP IPNY_UDP IPNY_TCPUDP IPNY_STICKY IPNY_MSSCLAMP IPNY_TAG
 105  109  %token  IPNY_TLATE IPNY_SEQUENTIAL
 106  110  %type   <port> portspec
 107  111  %type   <num> hexnumber compare range proto
 108  112  %type   <num> saddr daddr sobject dobject mapfrom rdrfrom dip
 109  113  %type   <ipa> hostname ipv4 ipaddr
↓ open down ↓ 931 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX