From owner-freebsd-stable Wed Feb 18 16:48:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA24460 for freebsd-stable-outgoing; Wed, 18 Feb 1998 16:48:50 -0800 (PST) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA24381; Wed, 18 Feb 1998 16:48:08 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id QAA05105; Wed, 18 Feb 1998 16:45:21 -0800 (PST) Message-Id: <199802190045.QAA05105@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Konstantin Chuguev cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: Some problems with raw IP programming In-reply-to: Your message of "Wed, 18 Feb 1998 22:51:06 +0500." <34EB1F8A.A2543E68@urc.ac.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Feb 1998 16:45:19 -0800 From: Mike Smith Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk > 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