Print this page
Only exploit ipf state keeping for CFW logging.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ipf/fil.c
          +++ new/usr/src/uts/common/inet/ipf/fil.c
↓ open down ↓ 2580 lines elided ↑ open up ↑
2581 2581                          }
2582 2582                  }
2583 2583          }
2584 2584  
2585 2585  #ifdef  IPFILTER_LOG
2586 2586          if ((ifs->ifs_fr_flags & FF_LOGGING) || (pass & FR_LOGMASK)) {
2587 2587                  (void) fr_dolog(fin, &pass);
2588 2588          }
2589 2589  #endif
2590 2590  
     2591 +        if (IFS_CFWLOG(ifs) && FR_ISBLOCK(pass))
     2592 +                ipf_block_cfwlog(fr, fin, ifs);
     2593 +
2591 2594          /*
2592 2595           * The FI_STATE flag is cleared here so that calling fr_checkstate
2593 2596           * will work when called from inside of fr_fastroute.  Although
2594 2597           * there is a similar flag, FI_NATED, for NAT, it does have the same
2595 2598           * impact on code execution.
2596 2599           */
2597 2600          fin->fin_flx &= ~FI_STATE;
2598 2601  
2599 2602          /*
2600 2603           * Only allow FR_DUP to work if a rule matched - it makes no sense to
↓ open down ↓ 5138 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX