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
[EMAIL PROTECTED] 815-342-5222 (cell phone)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to