<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: RE: CIPE-WIN32 pre3 Dr Watsons [was CIPE-WIN32 Routing Configuration]
From: "Damion K. Wilson" <dkw,AT,rcm,DOT,bm>
Date: Wed, 6 Dec 2000 17:00:41 +0100
In-reply-to: <000c01c05f18$b6a11e00$0132a8c0@kurowski>

That's really weird. Here, let me show you the code :-

    l_LocalInfo.sin_addr.s_addr = GetHostAddress (m_Peer.LocalIP());  //
This is where the local IP is used        l_LocalInfo.sin_port =
    l_LocalInfo.sin_family = AF_INET;

    m_PeerInfo.sin_addr.s_addr = GetHostAddress (m_Peer.PeerIP());
    m_PeerInfo.sin_port = m_Peer.PeerPort();
    m_PeerInfo.sin_family = AF_INET;

    if ((m_Socket = socket (AF_INET, SOCK_DGRAM, 0)) == SOCKET_ERROR) //
Fail if we can't make the socket
        DbgPrint ("[%s] can't create UDP socket\n", Name().c_str());
        throw CipeSocketIOException();
    else if (bind (m_Socket, (LPSOCKADDR) &l_LocalInfo, sizeof (struct
sockaddr_in))) // Fail if we can't bind the socket
        DbgPrint ("[%s] Can't bind to port [%d]\n", ntohs
(l_LocalInfo.sin_port), Name().c_str());
        closesocket (m_Socket);
        throw CipeSocketIOException();

This is the only place that this address is used in the program. If you are
entering a Local IP that neither matches any of the IP addresses bound to
working network adapters or and it's crashing then it's going to be
Winsock 2 that's complaining.

However, tcpip should not even be accepting packets that aren't directed to
bound IP addresses. If you are using ipchains, then you also need to use
ipmasqadm. This allows you to setup reverse masquerading on specified udp
and tcp ports. I use this myself on a (Linux based) CIPE WAN going across
masquerading (Linux based) firewalls.


*********** REPLY SEPARATOR  ***********

On 12/5/00 at 6:08 PM Matthew Kurowski wrote:

>I hate to bombard the list , so I'm sending this just to you.
>If I put in an IP to match the local and then change it from the Cipe CPL,
>it works fine.
>That "this" not found error from before (in msvcrt) happens everytime now
>with the non-matching IP on initial load.

<< | Thread Index | >> ]    [ << | Date Index | >> ]