FreeBSD Bugzilla – Attachment 16501 Details for
Bug 30235
/usr/sbin/portmap cannot listen to localhost UDP only (patch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 841 bytes, created by
Rasputin
on 2001-08-31 14:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Rasputin
Created:
2001-08-31 14:20:00 UTC
Size:
841 bytes
patch
obsolete
>--- portmap.c.orig Tue Apr 10 00:35:19 2001 >+++ portmap.c Thu Aug 30 13:51:06 2001 >@@ -159,12 +159,26 @@ > * If no hosts were specified, just bind to INADDR_ANY. Otherwise > * make sure 127.0.0.1 is added to the list. > */ >- ++nhosts; >- hosts = realloc(hosts, nhosts * sizeof(char *)); >- if (nhosts == 1) >+ if (nhosts == 0){ >+ ++nhosts; >+ hosts = realloc(hosts, nhosts * sizeof(char *)); > hosts[0] = "0.0.0.0"; >- else >- hosts[nhosts - 1] = "127.0.0.1"; >+ } >+ else { >+ /* add localhost if not already there */ >+ >+ int n, lh_requested = 0; >+ >+ for(n=0;n<nhosts;n++) { >+ if(!strcmp(hosts[n],"127.0.0.1")) lh_requested = 1; >+ } >+ >+ if (!lh_requested) { >+ ++nhosts; >+ hosts = realloc(hosts, nhosts * sizeof(char *)); >+ hosts[nhosts - 1] = "127.0.0.1"; >+ } >+ } > > /* > * Add UDP socket(s) - bind to specific IPs if asked to
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 30235
: 16501