Changeset 206


Ignore:
Timestamp:
01/08/13 00:57:58 (4 years ago)
Author:
xchaos
Message:

nifty hack - showing ip address instead of hostname for unregistered data transfers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prometheus.c

    r205 r206  
    33/*      "fair-per-IP" quality of service (QoS) utility          */ 
    44/*      requires Linux 2.4.x or 2.6.x with HTB support          */ 
    5 /*      Copyright(C) 2005-2012 Michael Polak, Arachne Labs      */ 
     5/*      Copyright(C) 2005-2013 Michael Polak, Arachne Labs      */ 
    66/*    iptables-restore support Copyright(C) 2007-2008 ludva     */ 
    77/*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */ 
    88/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */ 
    99 
    10 /* Modified by: xChaos, 20121011 
     10/* Modified by: xChaos, 20130107 
    1111                 ludva, 20080415 
    1212  
     
    233233 
    234234   push(keyword,keywords); 
    235    if(!defaultkeyword) defaultkeyword=keyword; 
     235   if(!defaultkeyword) 
     236   { 
     237    defaultkeyword=keyword; 
     238   } 
    236239   keywordcount++; 
    237240    
     
    464467     { 
    465468      TheIP(); 
    466       ip->addr=ipaddr; 
     469      ip->addr = ipaddr; 
    467470      if(eq(ip->addr,"0.0.0.0/0")) 
    468471      { 
    469        ip->name="(unregistered)"; 
    470        ip->min=free_min; 
    471        ip->max=ip->desired=free_max; 
     472       ip->name = "(unregistered)"; 
     473       ip->min = free_min; 
     474       ip->max = ip->desired=free_max; 
     475      } 
     476      else 
     477      { 
     478       ip->name = ipaddr; 
    472479      } 
    473480     } 
Note: See TracChangeset for help on using the changeset viewer.