Browse code

- listen & alias accept lists (e.g. listen= 1.2.3.4 5.6.7.8) - listen & -l accept interface names (e.g -l eth0 or listen= eth0 eth1) - if no interface is specified ser will listen on all the UP ipv4 interfaces it can find - ser will remove duplicate addresses automatically (e.g -l 1.2.3.4 -l 1.2.3.4 works now)

Andrei Pelinescu-Onciul authored on 09/09/2002 19:44:20
Showing 6 changed files
... ...
@@ -8,7 +8,7 @@
8 8
 VERSION = 0
9 9
 PATCHLEVEL = 8
10 10
 SUBLEVEL = 7
11
-EXTRAVERSION = -11-srv2
11
+EXTRAVERSION = -12-listen
12 12
 
13 13
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
14 14
 OS = $(shell uname -s)
... ...
@@ -30,10 +30,17 @@
30 30
 #endif
31 31
 
32 32
 
33
+struct id_list{
34
+	char* s;
35
+	struct id_list* next;
36
+};
37
+
33 38
 extern int yylex();
34 39
 void yyerror(char* s);
35 40
 char* tmp;
36 41
 void* f_tmp;
42
+struct id_list* lst_tmp;
43
+
37 44
 
38 45
 %}
39 46
 
... ...
@@ -45,6 +52,7 @@ void* f_tmp;
45 45
 	struct action* action;
46 46
 	struct net* ipnet;
47 47
 	struct ip_addr* ipaddr;
48
+	struct id_list* idlst;
48 49
 }
49 50
 
50 51
 /* terminals */
... ...
@@ -142,6 +150,8 @@ void* f_tmp;
142 142
 %type <ipaddr> ipv4, ipv6, ip
143 143
 %type <ipnet> ipnet
144 144
 %type <strval> host
145
+%type <strval> listen_id
146
+%type <idlst>  id_lst
145 147
 /*%type <route_el> rules;
146 148
   %type <route_el> rule;
147 149
 */
... ...
@@ -166,6 +176,67 @@ statement:	assign_stm
166 166
 		| CR	/* null statement*/
167 167
 	;
168 168
 
169
+listen_id:	ip			{	tmp=ip_addr2a($1);
170
+		 					if(tmp==0){
171
+								LOG(L_CRIT, "ERROR: cfg. parser: bad ip "
172
+										"addresss.\n");
173
+								$$=0;
174
+							}else{
175
+								$$=malloc(strlen(tmp)+1);
176
+								if ($$==0){
177
+									LOG(L_CRIT, "ERROR: cfg. parser: out of "
178
+											"memory.\n");
179
+								}else{
180
+									strncpy($$, tmp, strlen(tmp)+1);
181
+								}
182
+							}
183
+						}
184
+		 |	ID			{	$$=malloc(strlen($1)+1);
185
+		 					if ($$==0){
186
+									LOG(L_CRIT, "ERROR: cfg. parser: out of "
187
+											"memory.\n");
188
+							}else{
189
+									strncpy($$, $1, strlen($1)+1);
190
+							}
191
+						}
192
+		 |	STRING			{	$$=malloc(strlen($1)+1);
193
+		 					if ($$==0){
194
+									LOG(L_CRIT, "ERROR: cfg. parser: out of "
195
+											"memory.\n");
196
+							}else{
197
+									strncpy($$, $1, strlen($1)+1);
198
+							}
199
+						}
200
+		 |	host		{	$$=malloc(strlen($1)+1);
201
+		 					if ($$==0){
202
+									LOG(L_CRIT, "ERROR: cfg. parser: out of "
203
+											"memory.\n");
204
+							}else{
205
+									strncpy($$, $1, strlen($1)+1);
206
+							}
207
+						}
208
+	;
209
+
210
+id_lst:	  listen_id	{	$$=malloc(sizeof(struct id_list));
211
+						if ($$==0){
212
+							LOG(L_CRIT,"ERROR: cfg. parser: out of memory.\n");
213
+						}else{
214
+							$$->s=$1;
215
+							$$->next=0;
216
+						}
217
+					}
218
+		| listen_id id_lst	{
219
+						$$=malloc(sizeof(struct id_list));
220
+						if ($$==0){
221
+							LOG(L_CRIT,"ERROR: cfg. parser: out of memory.\n");
222
+						}else{
223
+							$$->s=$1;
224
+							$$->next=$2;
225
+						}
226
+							}
227
+		;
228
+
229
+
169 230
 assign_stm:	DEBUG EQUAL NUMBER { debug=$3; }
170 231
 		| DEBUG EQUAL error  { yyerror("number  expected"); }
171 232
 		| FORK  EQUAL NUMBER { dont_fork= ! $3; }
... ...
@@ -204,87 +275,21 @@ assign_stm:	DEBUG EQUAL NUMBER { debug=$3; }
204 204
 		| SERVER_SIGNATURE EQUAL error { yyerror("boolean value expected"); }
205 205
 		| REPLY_TO_VIA EQUAL NUMBER { reply_to_via=$3; }
206 206
 		| REPLY_TO_VIA EQUAL error { yyerror("boolean value expected"); }
207
-		| LISTEN EQUAL ip  {
208
-								if (sock_no< MAX_LISTEN){
209
-									tmp=ip_addr2a($3);
210
-								/*	tmp=inet_ntoa(*(struct in_addr*)&$3);*/
211
-									if (tmp==0){
212
-										LOG(L_CRIT, "ERROR: cfg. parser: "
213
-											" bad ip address: %s\n",
214
-											strerror(errno));
215
-									}else{
216
-										sock_info[sock_no].name.s=
217
-												(char*)malloc(strlen(tmp)+1);
218
-										if (sock_info[sock_no].name.s==0){
219
-											LOG(L_CRIT, "ERROR: cfg. parser: "
220
-														"out of memory.\n");
221
-										}else{
222
-											strncpy(sock_info[sock_no].name.s,
223
-													tmp, strlen(tmp)+1);
224
-											sock_info[sock_no].name.len=
225
-													strlen(tmp);
226
-											sock_info[sock_no].port_no=
227
-													port_no;
228
-											sock_no++;
229
-										}
230
-									}
231
-								}else{
232
-									LOG(L_CRIT, "ERROR: cfg. parser:"
233
-												" too many listen addresses"
234
-												"(max. %d).\n", MAX_LISTEN);
235
-								}
236
-							  }
237
-		| LISTEN EQUAL ID	 {
238
-								if (sock_no < MAX_LISTEN){
239
-									sock_info[sock_no].name.s=
240
-												(char*)malloc(strlen($3)+1);
241
-									if (sock_info[sock_no].name.s==0){
242
-										LOG(L_CRIT, "ERROR: cfg. parser:"
243
-														" out of memory.\n");
244
-									}else{
245
-										strncpy(sock_info[sock_no].name.s, $3,
246
-													strlen($3)+1);
247
-										sock_info[sock_no].name.len=strlen($3);
248
-										sock_info[sock_no].port_no= port_no;
249
-										sock_no++;
250
-									}
251
-								}else{
252
-									LOG(L_CRIT, "ERROR: cfg. parser: "
253
-												"too many listen addresses"
254
-												"(max. %d).\n", MAX_LISTEN);
255
-								}
256
-							  }
257
-		| LISTEN EQUAL STRING {
258
-								if (sock_no < MAX_LISTEN){
259
-									sock_info[sock_no].name.s=
260
-										(char*)malloc(strlen($3)+1);
261
-									if (sock_info[sock_no].name.s==0){
262
-										LOG(L_CRIT, "ERROR: cfg. parser:"
263
-													" out of memory.\n");
264
-									}else{
265
-										strncpy(sock_info[sock_no].name.s, $3,
266
-												strlen($3)+1);
267
-										sock_info[sock_no].name.len=strlen($3);
268
-										sock_info[sock_no].port_no=port_no;
269
-										sock_no++;
270
-									}
271
-								}else{
272
-									LOG(L_CRIT, "ERROR: cfg. parser: "
273
-												"too many listen addresses"
274
-												"(max. %d).\n", MAX_LISTEN);
275
-								}
276
-							  }
277
-		| LISTEN EQUAL  host {
207
+		| LISTEN EQUAL id_lst {
208
+							for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next){
278 209
 								if (sock_no < MAX_LISTEN){
279 210
 									sock_info[sock_no].name.s=
280
-										(char*)malloc(strlen($3)+1);
211
+										(char*)malloc(strlen(lst_tmp->s)+1);
281 212
 									if (sock_info[sock_no].name.s==0){
282 213
 										LOG(L_CRIT, "ERROR: cfg. parser:"
283 214
 													" out of memory.\n");
215
+										break;
284 216
 									}else{
285
-										strncpy(sock_info[sock_no].name.s, $3,
286
-												strlen($3)+1);
287
-										sock_info[sock_no].name.len=strlen($3);
217
+										strncpy(sock_info[sock_no].name.s,
218
+												lst_tmp->s,
219
+												strlen(lst_tmp->s)+1);
220
+										sock_info[sock_no].name.len=
221
+													strlen(lst_tmp->s);
288 222
 										sock_info[sock_no].port_no=port_no;
289 223
 										sock_no++;
290 224
 									}
... ...
@@ -292,14 +297,16 @@ assign_stm:	DEBUG EQUAL NUMBER { debug=$3; }
292 292
 									LOG(L_CRIT, "ERROR: cfg. parser: "
293 293
 												"too many listen addresses"
294 294
 												"(max. %d).\n", MAX_LISTEN);
295
+									break;
295 296
 								}
296
-							  }
297
-		
297
+							}
298
+							 }
298 299
 		| LISTEN EQUAL  error { yyerror("ip address or hostname"
299 300
 						"expected"); }
300
-		| ALIAS  EQUAL STRING { add_alias($3, strlen($3)); }
301
-		| ALIAS  EQUAL ID     { add_alias($3, strlen($3)); }
302
-		| ALIAS  EQUAL host   { add_alias($3, strlen($3)); }
301
+		| ALIAS EQUAL  id_lst { 
302
+								for(lst_tmp=$3; lst_tmp; lst_tmp=lst_tmp->next)
303
+									add_alias(lst_tmp->s, strlen(lst_tmp->s));
304
+							  }
303 305
 		| ALIAS  EQUAL error  { yyerror(" hostname expected"); }
304 306
 		| error EQUAL { yyerror("unknown config variable"); }
305 307
 	;
... ...
@@ -117,6 +117,30 @@ inline static int matchnet(struct ip_addr* ip, struct net* net)
117 117
 
118 118
 
119 119
 
120
+/* inits an ip_addr pointer from a sockaddr structure*/
121
+static inline void sockaddr2ip_addr(struct ip_addr* ip, struct sockaddr* sa)
122
+{
123
+	switch(sa->sa_family){
124
+	case AF_INET:
125
+			ip->af=AF_INET;
126
+			ip->len=4;
127
+			memcpy(ip->u.addr, &((struct sockaddr_in*)sa)->sin_addr, 4);
128
+			break;
129
+#ifdef USE_IPV6
130
+	case AF_INET6:
131
+			ip->af=AF_INET6;
132
+			ip->len=16;
133
+			memcpy(ip->u.addr, &((struct sockaddr_in6*)sa)->sin6_addr, 16);
134
+			break;
135
+#endif
136
+	default:
137
+			LOG(L_CRIT, "sockaddr2ip_addr: BUG: unknown address family %d\n",
138
+					sa->sa_family);
139
+	}
140
+}
141
+
142
+
143
+
120 144
 /* inits an ip_addr pointer from a sockaddr_union ip address */
121 145
 static inline void su2ip_addr(struct ip_addr* ip, union sockaddr_union* su)
122 146
 {
... ...
@@ -20,6 +20,12 @@
20 20
 #include <sys/wait.h>
21 21
 #include <signal.h>
22 22
 
23
+#include <sys/ioctl.h>
24
+#include <net/if.h>
25
+#ifdef __sun__
26
+#include <sys/sockio.h>
27
+#endif
28
+
23 29
 #include "config.h"
24 30
 #include "dprint.h"
25 31
 #include "route.h"
... ...
@@ -681,14 +687,129 @@ static void sig_usr(int signo)
681 681
 
682 682
 
683 683
 
684
-void test();
684
+/* add all family type addresses of interface if_name to the socket_info array
685
+ * if if_name==0, adds all addresses on all interfaces
686
+ * WARNING: it only works with ipv6 addresses on FreeBSD
687
+ * return: -1 on error, 0 on success
688
+ */
689
+int add_interfaces(char* if_name, int family, unsigned short port)
690
+{
691
+	struct ifconf ifc;
692
+	struct ifreq* ifr;
693
+	struct ifreq ifrcopy;
694
+	char*  last;
695
+	int size;
696
+	int lastlen;
697
+	int s;
698
+	char* tmp;
699
+	struct ip_addr addr;
700
+	int ret;
701
+	
702
+	/* ipv4 or ipv6 only*/
703
+	s=socket(family, SOCK_DGRAM, 0);
704
+	ret=-1;
705
+	lastlen=0;
706
+	ifc.ifc_req=0;
707
+	for (size=10; ; size*=2){
708
+		ifc.ifc_len=size*sizeof(struct ifreq);
709
+		ifc.ifc_req=(struct ifreq*) malloc(size*sizeof(struct ifreq));
710
+		if (ifc.ifc_req==0){
711
+			fprintf(stderr, "memory allocation failure\n");
712
+			goto error;
713
+		}
714
+		if (ioctl(s, SIOCGIFCONF, &ifc)==-1){
715
+			if(errno==EBADF) return 0; /* invalid descriptor => no such ifs*/
716
+			fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
717
+			goto error;
718
+		}
719
+		if  ((lastlen) && (ifc.ifc_len==lastlen)) break; /*success,
720
+														   len not changed*/
721
+		lastlen=ifc.ifc_len;
722
+		/* try a bigger array*/
723
+		free(ifc.ifc_req);
724
+	}
725
+	
726
+	last=(char*)ifc.ifc_req+ifc.ifc_len;
727
+	for(ifr=ifc.ifc_req; (char*)ifr<last;
728
+			ifr=(struct ifreq*)((char*)ifr+sizeof(ifr->ifr_name)+
729
+			#ifdef  __FreeBSD__
730
+				MAX(ifr->ifr_addr.sa_len, sizeof(struct sockaddr))
731
+			#else
732
+				( (ifr->ifr_addr.sa_family==AF_INET)?
733
+					sizeof(struct sockaddr_in):
734
+					((ifr->ifr_addr.sa_family==AF_INET6)?
735
+						sizeof(struct sockaddr_in6):sizeof(struct sockaddr)) )
736
+			#endif
737
+				)
738
+		)
739
+	{
740
+		if (ifr->ifr_addr.sa_family!=family){
741
+			/*printf("strange family %d skipping...\n",
742
+					ifr->ifr_addr.sa_family);*/
743
+			continue;
744
+		}
745
+		
746
+		if (if_name==0){ /* ignore down ifs only if listening on all of them*/
747
+			memcpy(&ifrcopy, ifr, sizeof(ifrcopy));
748
+			/*get flags*/
749
+			if (ioctl(s, SIOCGIFFLAGS,  &ifrcopy)!=-1){ /* ignore errors */
750
+				/* if if not up, skip it*/
751
+				if (!(ifrcopy.ifr_flags & IFF_UP)) continue;
752
+			}
753
+		}
754
+		
755
+		
756
+		
757
+		if ((if_name==0)||
758
+			(strncmp(if_name, ifr->ifr_name, sizeof(ifr->ifr_name))==0)){
759
+			
760
+				/*add address*/
761
+			if (sock_no<MAX_LISTEN){
762
+				sockaddr2ip_addr(&addr, &ifr->ifr_addr);
763
+				if ((tmp=ip_addr2a(&addr))==0) goto error;
764
+				/* fill the strings*/
765
+				sock_info[sock_no].name.s=(char*)malloc(strlen(tmp)+1);
766
+				if(sock_info[sock_no].name.s==0){
767
+					fprintf(stderr, "Out of memory.\n");
768
+					goto error;
769
+				}
770
+				/* fill in the new name and port */
771
+				sock_info[sock_no].name.len=strlen(tmp);
772
+				strncpy(sock_info[sock_no].name.s, tmp, 
773
+							sock_info[sock_no].name.len+1);
774
+				sock_info[sock_no].port_no=port;
775
+				sock_no++;
776
+				ret=0;
777
+			}else{
778
+				fprintf(stderr, "Too many addresses (max %d)\n", MAX_LISTEN);
779
+				goto error;
780
+			}
781
+		}
782
+			/*
783
+			printf("%s:\n", ifr->ifr_name);
784
+			printf("        ");
785
+			print_sockaddr(&(ifr->ifr_addr));
786
+			printf("        ");
787
+			ls_ifflags(ifr->ifr_name, family, options);
788
+			printf("\n");*/
789
+	}
790
+	free(ifc.ifc_req); /*clean up*/
791
+	close(s);
792
+	return  ret;
793
+error:
794
+	if (ifc.ifc_req) free(ifc.ifc_req);
795
+	close(s);
796
+	return -1;
797
+}
798
+
799
+
685 800
 
686 801
 int main(int argc, char** argv)
687 802
 {
688 803
 
689 804
 	FILE* cfg_stream;
690 805
 	struct hostent* he;
691
-	int c,r;
806
+	int c,r,t;
692 807
 	char *tmp;
693 808
 	char** h;
694 809
 	struct host_alias* a;
... ...
@@ -963,24 +1084,42 @@ int main(int argc, char** argv)
963 963
 	memset(pids, 0, sizeof(int)*(children_no+1));
964 964
 
965 965
 	if (sock_no==0) {
966
-		/* get our address, only the first one */
967
-		if (uname (&myname) <0){
968
-			fprintf(stderr, "cannot determine hostname, try -l address\n");
969
-			goto error;
970
-		}
971
-		sock_info[sock_no].name.s=(char*)malloc(strlen(myname.nodename)+1);
972
-		if (sock_info[sock_no].name.s==0){
973
-			fprintf(stderr, "Out of memory.\n");
974
-			goto error;
966
+		/* try to get all listening ipv4 interfaces */
967
+		if (add_interfaces(0, AF_INET, 0)==-1){
968
+			/* if error fall back to get hostname*/
969
+			/* get our address, only the first one */
970
+			if (uname (&myname) <0){
971
+				fprintf(stderr, "cannot determine hostname, try -l address\n");
972
+				goto error;
973
+			}
974
+			sock_info[sock_no].name.s=(char*)malloc(strlen(myname.nodename)+1);
975
+			if (sock_info[sock_no].name.s==0){
976
+				fprintf(stderr, "Out of memory.\n");
977
+				goto error;
978
+			}
979
+			sock_info[sock_no].name.len=strlen(myname.nodename);
980
+			strncpy(sock_info[sock_no].name.s, myname.nodename,
981
+					sock_info[sock_no].name.len+1);
982
+			sock_no++;
975 983
 		}
976
-		sock_info[sock_no].name.len=strlen(myname.nodename);
977
-		strncpy(sock_info[sock_no].name.s, myname.nodename,
978
-				sock_info[sock_no].name.len+1);
979
-		sock_no++;
980 984
 	}
981 985
 
986
+	/* try to change all the interface names into addresses
987
+	 *  --ugly hack */
988
+	for (r=0; r<sock_no;){
989
+		if (add_interfaces(sock_info[r].name.s, AF_INET,
990
+					sock_info[r].port_no)!=-1){
991
+			/* success => remove current entry (shift the entire array)*/
992
+			free(sock_info[r].name.s);
993
+			memmove(&sock_info[r], &sock_info[r+1], 
994
+						(sock_no-r)*sizeof(struct socket_info));
995
+			sock_no--;
996
+			continue;
997
+		}
998
+		r++;
999
+	}
982 1000
 	/* get ips & fill the port numbers*/
983
-	printf("Listening on ");
1001
+	printf("Listening on \n");
984 1002
 	for (r=0; r<sock_no;r++){
985 1003
 		he=resolvehost(sock_info[r].name.s);
986 1004
 		if (he==0){
... ...
@@ -1010,7 +1149,7 @@ int main(int argc, char** argv)
1010 1010
 		
1011 1011
 		hostent2ip_addr(&sock_info[r].address, he, 0); /*convert to ip_addr 
1012 1012
 														 format*/
1013
-		tmp=ip_addr2a(&sock_info[r].address);
1013
+		if ((tmp=ip_addr2a(&sock_info[r].address))==0) goto error;
1014 1014
 		sock_info[r].address_str.s=(char*)malloc(strlen(tmp)+1);
1015 1015
 		if (sock_info[r].address_str.s==0){
1016 1016
 			fprintf(stderr, "Out of memory.\n");
... ...
@@ -1045,9 +1184,49 @@ int main(int argc, char** argv)
1045 1045
 		strncpy(sock_info[r].port_no_str.s, port_no_str, strlen(port_no_str)+1);
1046 1046
 		sock_info[r].port_no_str.len=strlen(port_no_str);
1047 1047
 		
1048
-		printf("%s [%s]:%s\n",sock_info[r].name.s, sock_info[r].address_str.s,
1049
-				sock_info[r].port_no_str.s);
1048
+		printf("              %s [%s]:%s\n",sock_info[r].name.s,
1049
+				sock_info[r].address_str.s, sock_info[r].port_no_str.s);
1050
+	}
1051
+	/* removing duplicate addresses*/
1052
+	for (r=0; r<sock_no; r++){
1053
+		for (t=r+1; t<sock_no;){
1054
+			if ((sock_info[r].port_no==sock_info[t].port_no) &&
1055
+				(sock_info[r].address.af==sock_info[t].address.af) &&
1056
+				(memcmp(sock_info[r].address.u.addr, 
1057
+						sock_info[t].address.u.addr,
1058
+						sock_info[r].address.len)  == 0)
1059
+				){
1060
+				printf("removing duplicate (%d) %s [%s] == (%d) %s [%s]\n",
1061
+						r, sock_info[r].name.s, sock_info[r].address_str.s,
1062
+						t, sock_info[t].name.s, sock_info[t].address_str.s);
1063
+				
1064
+				/* add the name to the alias list*/
1065
+				if ((!sock_info[t].is_ip) && (
1066
+						(sock_info[t].name.len!=sock_info[r].name.len)||
1067
+						(strncmp(sock_info[t].name.s, sock_info[r].name.s,
1068
+								 sock_info[r].name.len)!=0))
1069
+					)
1070
+					add_alias(sock_info[t].name.s, sock_info[t].name.len);
1071
+						
1072
+				/* free space*/
1073
+				free(sock_info[t].name.s);
1074
+				free(sock_info[t].address_str.s);
1075
+				free(sock_info[t].port_no_str.s);
1076
+				/* shift the array*/
1077
+				memmove(&sock_info[t], &sock_info[t+1], 
1078
+							(sock_no-t)*sizeof(struct socket_info));
1079
+				sock_no--;
1080
+				continue;
1081
+			}
1082
+			t++;
1083
+		}
1050 1084
 	}
1085
+	/* print all the listen addresses */
1086
+	printf("Listening on \n");
1087
+	for (r=0; r<sock_no; r++)
1088
+		printf("              %s [%s]:%s\n",sock_info[r].name.s,
1089
+				sock_info[r].address_str.s, sock_info[r].port_no_str.s);
1090
+
1051 1091
 	printf("Aliases: ");
1052 1092
 	for(a=aliases; a; a=a->next) printf("%.*s ", a->alias.len, a->alias.s);
1053 1093
 	printf("\n");
... ...
@@ -53,7 +53,7 @@ int check_address(struct ip_addr* ip, char *name, int resolver)
53 53
 	/* maybe we are lucky and name it's an ip */
54 54
 	s=ip_addr2a(ip);
55 55
 	if (s){
56
-		DBG("check_address(%s, %s, %d)\n", ip_addr2a(ip), name, resolver);
56
+		DBG("check_address(%s, %s, %d)\n", s, name, resolver);
57 57
 	#ifdef USE_IPV6
58 58
 		if ((ip->af==AF_INET6) && (strcasecmp(name, s)==0))
59 59
 				return 0;
... ...
@@ -164,7 +164,8 @@ char* received_builder(struct sip_msg *msg, int *received_len)
164 164
 							inet_ntoa(*(struct in_addr *)&source_ip));
165 165
 	*/
166 166
 	memcpy(buf, RECEIVED, RECEIVED_LEN);
167
-	tmp=ip_addr2a(source_ip);
167
+	if ( (tmp=ip_addr2a(source_ip))==0)
168
+		return 0; /* error*/
168 169
 	tmp_len=strlen(tmp);
169 170
 	len=RECEIVED_LEN+tmp_len;
170 171
 	if(source_ip->af==AF_INET6){
... ...
@@ -6,9 +6,8 @@
6 6
 
7 7
 
8 8
 debug=9          # debug level (cmd line: -dddddddddd)
9
-#fork=yes          # (cmd. line: -D)
10
-fork=yes
11
-fork=no
9
+fork=yes          # (cmd. line: -D)
10
+#fork=no
12 11
 log_stderror=yes # (cmd line: -E)
13 12
 #log_stderror=no	# (cmd line: -E)
14 13
 
... ...
@@ -18,7 +17,8 @@ check_via=no     # (cmd. line: -v)
18 18
 dns=off           # (cmd. line: -r)
19 19
 rev_dns=off      # (cmd. line: -R)
20 20
 #port=5070
21
-#listen=10.0.0.179
21
+listen=10.0.0.179 lo	dorian
22
+listen=eth0
22 23
 #listen=127.0.0.1
23 24
 #listen=192.168.57.33
24 25
 #listen=192.168.57.72