[CUWiN-Dev] HSLSD Not Sending HSLS(9191) Packets

David Young dyoung at pobox.com
Mon Jan 15 16:17:39 CST 2007


On Mon, Jan 15, 2007 at 03:42:22PM +0200, Socrates Socrates wrote:
> Hi Matthew, David
> 
> At last, well problem solved.
> The problem was that function beacon_rx_socket()in ssrx/ssrv.c. bound
> address 0.0.0.0 to port 9191. However, the was no prior call to setsockopt()
> with *SO_REUSEADDR.*
> So beacon_tx_socket() failed to bind and somehow it was using the
> "arbitrary" port, instead of 9191, to which my Linux HSLSD was sending it's
> packets. So all I did was to call setsocketopt with the SO_REUSEADDR option
> and it works fine. Well at least that's how I solved the problem.

Lawrence,

I do not understand how hslsd escaped printing at least one error message
if it failed to bind the desired address and port.  For example, it
should have printed in beacon_tx_socket():

        /* Bind any address on the interface named by ifindex. */

        if (bind(s, lintfree_const_cast(struct sockaddr *)srcaddr_in,
            sockaddr_in_getlen(srcaddr_in)) == -1) {
                loglib_warn("%s: bind", __func__);
                goto post_sock_err;
        }

and in hsls_interface_create():

        else if ((hi->hi_tx_sock = hsls_af_iftx_socket(ha,
            im->im_srcaddr, im->im_ifindex)) == -1) {
                loglib_warn("%s: hsls_af_iftx_socket", __func__);
                goto post_srcaddr_err;

For the sake of your development, it is really important for the warnings
to appear.  hslsd may conceal bugs from you, if it does not print the
warnings it is supposed to.

> One last (I hope) question. How do I tell hsls to advertize my lan address?
> My laptop has eth1(wireless) address 169.254.237.50 and Lan eth0 address
> 192.168.12.1.

My ethernet has address 10.168.112.254.  I tell hslsd to advertise it
like this:

        -f inet -t stub -i sip0 -p 10.168.112.254/24

You will need to change the interface name, address, and mask length.

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list