crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs

ipfdenied.c (730B)


      1 /*************************************************************************
      2  * This file is part of Crosroads 1.23, a load balancer and fail over
      3  * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL.
      4  * Visit http://crossroads.e-tunity.com for information.
      5  *************************************************************************/
      6 #include "crossroads.h"
      7 
      8 int ipf_denied () {
      9     int i;
     10     
     11     /* Never deny a connection when we don't have a deny list. */
     12     if (! activeservice->denychain)
     13 	return (0);
     14     
     15     /* Try all in the chain. */
     16     for (i = 0; i < activeservice->ndenychain; i++)
     17 	if (ipf_match (activeservice->denychain[i]))
     18 	    return (1);
     19 
     20     /* Deny chain doesn't match */
     21     return (0);
     22 }