Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Oct 2002 12:58:42 -0500
From:      Randall Stewart <randall@stewart.chicago.il.us>
To:        freebsd-net@freebsd.org
Subject:   inetd issue
Message-ID:  <3DA1CB52.9080302@stewart.chicago.il.us>

next in thread | raw e-mail | index | archive | help
Hi:

While attempting to make inetd work with SCTP (the one
distrbituted with the KAME stack now).. I ran in to
a little issue..

It appears when inetd opens its socket it does:
"
if ((sep->se_fd = socket(sep->se_family, sep->se_socktype, 0)) < 0) {
		if (debug)
			warn("socket failed on %s/%s",
				sep->se_service, sep->se_proto);
		syslog(LOG_ERR, "%s/%s: socket: %m",
		    sep->se_service, sep->se_proto);
		return;
}

This of course causes a problem with a SCTP TCP-Style symantic which
also uses SOCK_STREAM...

Should not this really be:

"

struct protoent *p;
int proto_num;

p = getprotobyname(sep->se_proto);
if(p){
     proto_num = p->p_proto;
}else{
     proto_num = 0;
}
if ((sep->se_fd = socket(sep->se_family, sep->se_socktype,
      proto_num)) < 0) {
		if (debug)
			warn("socket failed on %s/%s",
				sep->se_service, sep->se_proto);
		syslog(LOG_ERR, "%s/%s: socket: %m",
		    sep->se_service, sep->se_proto);
		return;
}
"


Thanks

R
-- 
Randall R. Stewart
randall@stewart.chicago.il.us 815-342-5222 (cell phone)


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




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