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/uts/common/inet/ipf/ip_log.c
          +++ new/usr/src/uts/common/inet/ipf/ip_log.c
   1    1  /*
   2    2   * Copyright (C) 1997-2003 by Darren Reed.
   3    3   *
   4    4   * See the IPFILTER.LICENCE file for details on licencing.
   5    5   *
   6    6   * $Id: ip_log.c,v 2.75.2.7 2005/06/11 07:47:44 darrenr Exp $
   7    7   *
   8    8   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
   9    9   * Use is subject to license terms.
  10   10   *
  11      - * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
       11 + * Copyright 2019 Joyent, Inc.
  12   12   */
  13   13  
  14   14  #include <sys/param.h>
  15   15  #if defined(KERNEL) || defined(_KERNEL)
  16   16  # undef KERNEL
  17   17  # undef _KERNEL
  18   18  # define        KERNEL  1
  19   19  # define        _KERNEL 1
  20   20  #endif
  21   21  #if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
↓ open down ↓ 351 lines elided ↑ open up ↑
 373  373          if (fin->fin_fr != NULL) {
 374  374                  ipfl.fl_loglevel = fin->fin_fr->fr_loglevel;
 375  375                  ipfl.fl_logtag = fin->fin_fr->fr_logtag;
 376  376          } else {
 377  377                  ipfl.fl_loglevel = 0xffff;
 378  378                  ipfl.fl_logtag = FR_NOLOGTAG;
 379  379          }
 380  380          if (fin->fin_nattag != NULL)
 381  381                  bcopy(fin->fin_nattag, (void *)&ipfl.fl_nattag,
 382  382                        sizeof(ipfl.fl_nattag));
      383 +        bcopy(fin->fin_fr->fr_uuid, ipfl.fl_uuid, sizeof (ipfl.fl_uuid));
 383  384          ipfl.fl_flags = flags;
 384  385          ipfl.fl_dir = fin->fin_out;
 385  386          ipfl.fl_lflags = fin->fin_flx;
 386  387          ptrs[0] = (void *)&ipfl;
 387  388          sizes[0] = sizeof(ipfl);
 388  389          types[0] = 0;
 389  390  # if defined(MENTAT) && defined(_KERNEL)
 390  391          /*
 391  392           * Are we copied from the mblk or an aligned array ?
 392  393           */
↓ open down ↓ 309 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX