Corrected pointer error in ggsn.c
diff --git a/examples/ggsn.conf b/examples/ggsn.conf
index 5550525..9fb62f6 100644
--- a/examples/ggsn.conf
+++ b/examples/ggsn.conf
@@ -27,7 +27,7 @@
 # TAG: statedir
 # Directory to use for nonvolatile storage. 
 # The program must have write access to this directory.
-#pidfile /var/lib/ggsn/
+#statedir /var/lib/ggsn/
 
 
 # TAG: listen
@@ -53,6 +53,7 @@
 # Dynamic IP address pool.
 # Used for allocation of dynamic IP address when address is not given
 # by HLR or radius server.
+# If this option is not given then the net option is used as a substitute.
 #dynip 192.168.0.0/24
 
 # TAG: statip
diff --git a/ggsn/cmdline.c b/ggsn/cmdline.c
index bb5c3f1..d8eafe5 100644
--- a/ggsn/cmdline.c
+++ b/ggsn/cmdline.c
@@ -53,8 +53,8 @@
   printf("   -nSTRING   --net=STRING       Network (default='192.168.0.0/24')\n");
   printf("              --ipup=STRING      Script to run after link-up\n");
   printf("              --ipdown=STRING    Script to run after link-down\n");
-  printf("              --dynip=STRING     Dynamic IP address pool (default='192.168.0.0/24')\n");
-  printf("              --statip=STRING    Static IP address pool (default='192.168.1.0/24')\n");
+  printf("              --dynip=STRING     Dynamic IP address pool\n");
+  printf("              --statip=STRING    Static IP address pool\n");
   printf("              --pcodns1=STRING   PCO DNS Server 1 (default='0.0.0.0')\n");
   printf("              --pcodns2=STRING   PCO DNS Server 2 (default='0.0.0.0')\n");
   printf("              --timelimit=INT    Exit after timelimit seconds (default='0')\n");
@@ -111,8 +111,8 @@
   args_info->net_arg = strdup("192.168.0.0/24") ;\
   args_info->ipup_arg = NULL; \
   args_info->ipdown_arg = NULL; \
-  args_info->dynip_arg = strdup("192.168.0.0/24") ;\
-  args_info->statip_arg = strdup("192.168.1.0/24") ;\
+  args_info->dynip_arg = NULL; \
+  args_info->statip_arg = NULL; \
   args_info->pcodns1_arg = strdup("0.0.0.0") ;\
   args_info->pcodns2_arg = strdup("0.0.0.0") ;\
   args_info->timelimit_arg = 0 ;\
diff --git a/ggsn/cmdline.ggo b/ggsn/cmdline.ggo
index 0e3c548..ca4e2c7 100644
--- a/ggsn/cmdline.ggo
+++ b/ggsn/cmdline.ggo
@@ -24,8 +24,8 @@
 option  "ipup"        - "Script to run after link-up"    string no
 option  "ipdown"      - "Script to run after link-down"  string no
 
-option  "dynip"       - "Dynamic IP address pool"       string default="192.168.0.0/24" no
-option  "statip"      - "Static IP address pool"        string default="192.168.1.0/24" no
+option  "dynip"       - "Dynamic IP address pool"       string no
+option  "statip"      - "Static IP address pool"        string no
 
 option  "pcodns1"     - "PCO DNS Server 1"              string default="0.0.0.0" no
 option  "pcodns2"     - "PCO DNS Server 2"              string default="0.0.0.0" no
diff --git a/ggsn/cmdline.h b/ggsn/cmdline.h
index 0cbf483..f083dbe 100644
--- a/ggsn/cmdline.h
+++ b/ggsn/cmdline.h
@@ -29,8 +29,8 @@
   char * net_arg;	/* Network (default='192.168.0.0/24').  */
   char * ipup_arg;	/* Script to run after link-up.  */
   char * ipdown_arg;	/* Script to run after link-down.  */
-  char * dynip_arg;	/* Dynamic IP address pool (default='192.168.0.0/24').  */
-  char * statip_arg;	/* Static IP address pool (default='192.168.1.0/24').  */
+  char * dynip_arg;	/* Dynamic IP address pool.  */
+  char * statip_arg;	/* Static IP address pool.  */
   char * pcodns1_arg;	/* PCO DNS Server 1 (default='0.0.0.0').  */
   char * pcodns2_arg;	/* PCO DNS Server 2 (default='0.0.0.0').  */
   int timelimit_arg;	/* Exit after timelimit seconds (default='0').  */
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 74fe1cc..5011ed1 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -132,7 +132,7 @@
   }
 
   pdp_ntoeua(&member->addr, &pdp->eua);
-  pdp->peer = &member;
+  pdp->peer = member;
   pdp->ipif = tun; /* TODO */
   member->peer = pdp;
 
@@ -259,7 +259,7 @@
 	      PACKAGE, args_info.listen_arg);
       syslog(LOG_ERR, "Invalid listening address: %s!", 
 	     args_info.listen_arg);
-      return 1;
+      exit(1);
     }
     else {
       memcpy(&listen_.s_addr, host->h_addr, host->h_length);
@@ -275,21 +275,30 @@
     if(ippool_aton(&net, &mask, args_info.net_arg, 0)) {
       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
 	      "Invalid network address: %s!", args_info.net_arg);
-      return -1;
+      exit(1);
     }
   }
+  else {
+    sys_err(LOG_ERR, __FILE__, __LINE__, 0,
+	    "Network address must be specified: %s!", args_info.net_arg);
+    exit(1);
+  }
 
   /* dynip                                                        */
   if (!args_info.dynip_arg) {
-    sys_err(LOG_ERR, __FILE__, __LINE__, 0,
-	    "No dynamic address pool given!");
-    return -1;
+    if (ippool_new(&ippool, args_info.net_arg, 
+		   IPPOOL_NONETWORK | IPPOOL_NOBROADCAST)) {
+      sys_err(LOG_ERR, __FILE__, __LINE__, 0,
+	      "Failed to allocate IP pool!");
+      exit(1);
+    }
   }
   else {
     if (ippool_new(&ippool, args_info.dynip_arg, 
 		   IPPOOL_NONETWORK | IPPOOL_NOBROADCAST)) {
       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
 	      "Failed to allocate IP pool!");
+      exit(1);
     }
   }