Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 76896 Details for
Bug 98726
ucspi-tcp tcpserver: limits patch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ipv6 patch for limits
0.88-limits-ipv6.patch (text/plain), 1.50 KB, created by
Manuel Mausz
on 2006-01-12 04:49:10 UTC
(
hide
)
Description:
ipv6 patch for limits
Filename:
MIME Type:
Creator:
Manuel Mausz
Created:
2006-01-12 04:49:10 UTC
Size:
1.50 KB
patch
obsolete
>diff -Naur ucspi-tcp-0.88.orig/tcpserver.c ucspi-tcp-0.88/tcpserver.c >--- ucspi-tcp-0.88.orig/tcpserver.c 2006-01-12 13:38:18.000000000 +0100 >+++ ucspi-tcp-0.88/tcpserver.c 2006-01-12 13:38:18.000000000 +0100 >@@ -87,7 +87,7 @@ > > typedef struct > { >- char ip[4]; >+ char ip[16]; > pid_t pid; > } baby; > >@@ -314,13 +314,16 @@ > > if (!flagdeny && (maxconnip || maxconnc)) { > unsigned long u, c1=0, cc=0; >- for (u=0; u < limit; u++) if (child[u].pid != 0) { >- if ((child[u].ip[0] == remoteip[0]) && >- (child[u].ip[1] == remoteip[1]) && >- (child[u].ip[2] == remoteip[2]) ) { >- cc++; >- if (child[u].ip[3] == remoteip[3]) c1++; >+ for (u=0; u < limit; u++) { >+ if (child[u].pid != 0) { >+ if (fakev4) { >+ if (byte_equal(child[u].ip, 12, remoteip)) cc++; > } >+ else { >+ if (byte_equal(child[u].ip, 15, remoteip)) cc++; >+ } >+ if (byte_equal(child[u].ip, 16, remoteip)) c1++; >+ } > } > if (maxconnc && (cc >= maxconnc)) flagdeny = 4; > if (maxconnip && (c1 >= maxconnip)) flagdeny = 3; >@@ -670,7 +673,7 @@ > --numchildren; printstatus(); > break; > default: >- for (u=0; u < limit; u++) if (child[u].pid == 0) { byte_copy(child[u].ip,4,remoteip); child[u].pid = pid; break; } >+ for (u=0; u < limit; u++) if (child[u].pid == 0) { byte_copy(child[u].ip,16,remoteip); child[u].pid = pid; break; } > if (u == limit) strerr_die1x(111,"tcpserver: ERROR: no empty space for new child?!"); /* never happens */ > } > close(t);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 98726
:
63193
|
76896
|
76956
|
96809
|
101953
|
108790