Download | Plain Text | No Line Numbers
- --- tcpserver.c.orig 2006-09-12 18:58:29.000000000 +0200
- +++ tcpserver.c 2006-09-12 19:01:47.000000000 +0200
- @@ -88,7 +88,7 @@
-
- typedef struct
- {
- - char ip[4];
- + char ip[16];
- pid_t pid;
- } baby;
-
- @@ -248,8 +248,13 @@
- long c1=0, cc=0;
- for (u=0; u < limit; u++)
- if (child[u].pid != 0) {
- - if (byte_equal(child[u].ip, 3, remoteip)) cc++;
- - if (byte_equal(child[u].ip, 4, remoteip)) c1++;
- + if (fakev4) {
- + if (byte_equal(child[u].ip, 15, remoteip)) cc++;
- + }
- + else {
- + if (byte_equal(child[u].ip, 12, remoteip)) cc++;
- + }
- + if (byte_equal(child[u].ip, 16, remoteip)) c1++;
- }
- if (maxconnc != -1 && (cc >= maxconnc)) flagdeny = 4;
- if (maxconnip != -1 && (c1 >= maxconnip)) flagdeny = 3;
- @@ -609,7 +614,7 @@
- default:
- for (u=0; u < limit; u++)
- if (child[u].pid == 0) {
- - byte_copy(child[u].ip,4,remoteip);
- + byte_copy(child[u].ip,16,remoteip);
- child[u].pid = pid;
- break;
- }
-