nifty hack - showing ip address instead of hostname for unregistered data transfers
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 7 Jan 2013 23:57:58 +0000 (23:57 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 7 Jan 2013 23:57:58 +0000 (23:57 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@206 251d49ef-1d17-4917-a970-b30cf55b089b

prometheus.c

index 780b15858c8dadec585d28a63b31ffe8c0350205..9f22205729c76c6c7f7498d88ad12e0fe7d1a116 100644 (file)
@@ -2,12 +2,12 @@
  /*     Prometheus QoS - you can "steal fire" from your ISP     */\r
 /*      "fair-per-IP" quality of service (QoS) utility          */\r
 /*      requires Linux 2.4.x or 2.6.x with HTB support          */\r
  /*     Prometheus QoS - you can "steal fire" from your ISP     */\r
 /*      "fair-per-IP" quality of service (QoS) utility          */\r
 /*      requires Linux 2.4.x or 2.6.x with HTB support          */\r
-/*      Copyright(C) 2005-2012 Michael Polak, Arachne Labs      */\r
+/*      Copyright(C) 2005-2013 Michael Polak, Arachne Labs      */\r
 /*    iptables-restore support Copyright(C) 2007-2008 ludva     */\r
 /*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
 \r
 /*    iptables-restore support Copyright(C) 2007-2008 ludva     */\r
 /*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
 \r
-/* Modified by: xChaos, 20121011\r
+/* Modified by: xChaos, 20130107\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
@@ -232,7 +232,10 @@ void get_config(char *config_filename)
    keyword->leaf_discipline="";\r
 \r
    push(keyword,keywords);\r
    keyword->leaf_discipline="";\r
 \r
    push(keyword,keywords);\r
-   if(!defaultkeyword) defaultkeyword=keyword;\r
+   if(!defaultkeyword)\r
+   {\r
+    defaultkeyword=keyword;\r
+   }\r
    keywordcount++;\r
    \r
    kwd=NULL;\r
    keywordcount++;\r
    \r
    kwd=NULL;\r
@@ -463,12 +466,16 @@ void get_traffic_statistics(void)
      else \r
      {\r
       TheIP();\r
      else \r
      {\r
       TheIP();\r
-      ip->addr=ipaddr;\r
+      ip->addr = ipaddr;\r
       if(eq(ip->addr,"0.0.0.0/0"))\r
       {\r
       if(eq(ip->addr,"0.0.0.0/0"))\r
       {\r
-       ip->name="(unregistered)";\r
-       ip->min=free_min;\r
-       ip->max=ip->desired=free_max;\r
+       ip->name = "(unregistered)";\r
+       ip->min = free_min;\r
+       ip->max = ip->desired=free_max;\r
+      }\r
+      else\r
+      {\r
+       ip->name = ipaddr;\r
       }\r
      }\r
      \r
       }\r
      }\r
      \r
This page took 0.127607 seconds and 4 git commands to generate.