improved logging
[svn/Prometheus-QoS/.git] / parsehosts.c
index 92ee23ac12dd5442b8b83f8774d4cd9da72a901a..1e8dbe6773502e9b18f580570257cba552fe20df 100644 (file)
@@ -51,7 +51,7 @@ parse_ip(char *str)
 {\r
  char *ptr, *ipaddr, *ip6range = NULL, *ipname = NULL, *lmsid = NULL;\r
 \r
- if(ip6prefix) /* Try this only if IPv6 subsystem is active...*/\r
+ if(ip6prefix) /* Try this only if IPv6 subsystem is active... */\r
  {\r
   ptr = strstr(str, "::");\r
   if(ptr && ptr-str > 4)\r
@@ -160,6 +160,7 @@ void parse_hosts(char *hosts)
    if(lastIP6)\r
    {\r
     lastIP6->sharing = substring;\r
+    lastIP6 = NULL;\r
    }\r
    while(*substring and *substring != '\n')\r
    {\r
@@ -174,6 +175,11 @@ void parse_hosts(char *hosts)
    if_exists(keyword,keywords,(substring=strstr(str,keyword->key)))\r
    {\r
     parse_ip(str);\r
+    if(lastIP6)\r
+    {\r
+     lastIP6->sharing = ip->name;\r
+     lastIP6 = NULL;\r
+    }\r
     ip->keyword = keyword;\r
     keyword->ip_count++;\r
     ip->prio = keyword->default_prio;\r
This page took 0.11814 seconds and 4 git commands to generate.