Hi,

i have a problem with a simple daemon that I'm writing (the problem
is not happening on the x86 target).

Basically the piece of code that is creating the problem is the following:

#include <arpa/inet.h>

int main()
{
    struct sockaddr_in addr_1, addr_2, addr_3;

    addr_1.sin_addr = inet_makeaddr(127, 1);
    addr_2.sin_addr = inet_makeaddr(0, 0);
    addr_3.sin_addr.s_addr = INADDR_ANY;

    printf("Server (1), binded to %s\n",inet_ntoa(addr_1.sin_addr));
    printf("Server (2), binded to %s\n",inet_ntoa(addr_2.sin_addr));
    printf("Server (3), binded to %s\n",inet_ntoa(addr_3.sin_addr));

    return 0;
}

the output of this code on an ixp4xx target is the following:

Server (1), binded to 0.0.133.112
Server (2), binded to 0.0.133.112
Server (3), binded to 0.0.0.0

While it should be 127.0.0.1 on the first case and 0.0.0.0 on the second
and the third cases.

--
--------------------------------------------------------
Roberto Riggio, PhD
CREATE-NET
Pervasive Area
Researcher
Via alla Cascata 56/D - 38123 Povo Trento (Italy)
e-mail: roberto.rig...@create-net.org
Tel: (+39) 0461 408400 - interno/extension 708
Fax: (+39) 0461 421157
http://www.create-net.org/
--------------------------------------------------------

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited according to
the Italian Law 196/2003 of the Legislature. If you received this in
error, please contact the sender and delete the material from any
computer.

Le informazioni contenute in questo messaggio di posta elettronica e
nei file allegati sono da considerarsi strettamente riservate. Il loro
utilizzo e' consentito esclusivamente al destinatario del messaggio,
per le finalita' indicate nel messaggio stesso. Qualora riceveste questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla cancellazione del
messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo,
od utilizzarlo per finalita' diverse, costituisce comportamento
contrario ai principi dettati dal D. Lgs. 196/2003.

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to