lkml.org 
[lkml]   [2000]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: bind() allowed to non-local addresses
    On Thu, Oct 19, 2000 at 12:30:52AM +0100, Alan Cox wrote:
    > > Assuming that my "compatibility argument" is not considered valid. What
    > > I really need is some good ammunition for going back to Sun to ask them
    > > to change the JRE spec -- like some significant kernel features or Linux
    > > applications that relies on this new bind() behavior.
    >
    > The XNS specification seems loose enough to allow the Linux behaviour. I don't

    I cant see why..

    > think we should however adopt it as default behaviour. Programs that dont care
    > about addresses use INADDR_ANY.


    IMHO it does _not_ allow Linux behaviour:

    ----(Snipped from SUS)----

    NAME

    bind - bind a name to a socket

    [...]

    RETURN VALUE

    Upon successful completion, bind() returns 0. Otherwise, -1 is returned and errno
    is set to indicate the error.

    ERRORS

    The bind() function will fail if:

    [...]

    [EADDRNOTAVAIL]
    The specified address is not available from the local machine.

    -----------------------------

    So binding to a non-local ip address shouldnt be allowed because it "is not
    available from the local machine"; even if the machine has a dynamic ip.


    Alberto Bertogli
    albertogli@altavista.net

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-03-22 12:41    [W:0.021 / U:61.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site