*BSD News Article 89756


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mel.aone.net.au!grumpy.fl.net.au!news.webspan.net!newsfeeds.sol.net!news.maxwell.syr.edu!news.mathworks.com!uunet!in2.uu.net!129.35.248.10!ausnews.austin.ibm.com!rtpnews.raleigh.ibm.com!news@rtpnews.raleigh.ibm.com
From: tjevans@raleigh.ibm.com (Thomas Evans)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Panic in tcp_output with 2.2 0205 GAMMA
Date: 20 Feb 1997 17:01:49 GMT
Organization: ISSC South Region, RTP, NC
Lines: 28
Message-ID: <5ei01t$1i18@rtpnews.raleigh.ibm.com>
Reply-To: tjevans@raleigh.ibm.com
NNTP-Posting-Host: holein1.raleigh.ibm.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35852

The following piece of code causes FreeBSD to panic:

#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>

main(int argc, char *argv[])
{
char buf[8];
int rc, s=socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in serv;

serv.sin_family=AF_INET;
serv.sin_addr.s_addr=inet_addr(argv[1]);
serv.sin_port=htons(7);

rc=sendto(s, buf, sizeof(buf), MSG_OOB, &serv, sizeof(serv));
printf("rc=%d\n",rc);

close(s);
}

Looks to me that tcp_template is not set because the implied connect 
isn't done for OOB data.

-- 
Tom Evans  tjevans@raleigh.ibm.com
Normal disclaimer applies...