Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 1998 16:45:19 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Konstantin Chuguev <joy@urc.ac.ru>
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG
Subject:   Re: Some problems with raw IP programming 
Message-ID:  <199802190045.QAA05105@dingo.cdrom.com>
In-Reply-To: Your message of "Wed, 18 Feb 1998 22:51:06 %2B0500." <34EB1F8A.A2543E68@urc.ac.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Hi, IP networking gurus :-)
> 
> Please help me to solve these problems:
> 
> 
> I wrote a small daemon using tun* devices for IP-in-IP tunnel.
> (Did not like any soft I saw before :-)
> 
> It works almost fine (under 2.2.5-STABLE), but has 3 problems.
> 
> 1. I use connected sockets (i.e. bind() and connect()):
> ---
>     struct in_addr local_ip, remote_ip ;
>     int raw_ip, tunnel, max_fd ;
>     struct sockaddr_in local_ipaddr, remote_ipaddr ;
>     const int true = 1 ;
> 
> /* Initialization of local_ip and remote_ip with inet_aton() stripped... */

My guess would be that you forgot to bzero() these structures before 
you initialised them.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802190045.QAA05105>