Description of problem: the directory seems to be unable to store a different listen address for the admin server, than the ip address of the first interface avaible. neither can it be configured over the configuration of the admin server in the console, nor in the directory itself. Version-Release number of selected component (if applicable): I'm using fedora-ds 1.0.2-1 on Fedora Core 5 (regularly updated) How reproducible: seems to be reproducible everytime, as i already described this problem on #fedora-ds, where that problem could be reproduced by some users. Steps to Reproduce: 1. open the admin console 2. open the admin server part from the server group 3. try to set any other ip than the address of your first interface Actual results: it doesnt work, neither if you do it the console way, nor the directory way. i just can't set any other ip! if i try to set the listen address in the apache config file (console.conf), it works and listens to the correct address, but the console doesnt work anymore: it initializes and authenticates successfully, but if i select the admin server from the server group, it says the admin server is DOWN. Expected results: the admin server should be able to listen to any other address ip address than just the one of the first interface avaible, and that means to ip aliases too! Additional info: the error messages are: in the admin console: Attribute[configuration.nsserveraddress] has invalid value and if i try to set it in the directory, i get: Unknown Error best regards, Johannes Russek
Ok, did a little triage on it. The bug is in adminserver/admserv/cgi-src40/config.c in the function validate_addr() It looks like it is trying to restrict the IP address to the hostname of the machine (as determined by PR_GetSystemInfo()). So the question is, do we do away with this and let the user hang themselves if they enter the wrong address?
Sounds like we should fix it to allow the user to specify any valid IP address or hostname. Not sure what other possible console or other code this may break though.
i have no clue about the functions you should or shouldnt use, but what about getifaddrs(), i think it's avaible on linux and freebsd, but i don't know how portable and threadsafe and whatyouneed it is :) regards, johannes russek
(In reply to comment #1) > The bug is in adminserver/admserv/cgi-src40/config.c in the function validate_addr() but does this explain the error if i try to change it in the directory itself? regards, johannes russek
Created attachment 132402 [details] Patch to bind to the IP address Here is one way to do it. PR_Bind to the IP address on a random port. If the address is valid then we should bind ok. If not it will fail. I'm not sure whether we care *why* the bind failed but this function doesn't really have the capability to return an error message so we're a bit limited.
Set to localhost correctly. Verified aginst: 1195517861 redhat-ds-base-8.0.0-11.el5dsrv Mon Nov 19 2007 1195517864 redhat-ds-admin-8.0.0-1.15.el5dsrv Mon Nov 19 2007 1195517865 redhat-ds-console-8.0.0-8.el5dsrv Mon Nov 19 2007 1195517866 redhat-admin-console-8.0.0-9.el5dsrv Mon Nov 19 2007