SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] Bug in adl_open_sctp_socket() in "adaptation.c" (Sorry for Mail Encoding)


Chronological Thread 
  • From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
  • To: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] Bug in adl_open_sctp_socket() in "adaptation.c" (Sorry for Mail Encoding)
  • Date: Fri Nov 2 17:37:01 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi Chang Jin-woong,

thank you for your reports. Both will be fixed in the next prerelease. The one
with the missing optlen initialization was already known and does even yield to
problems under Linux. But only sometimes...

Please let us know about all modifications necessary to use the sctplib under
solaris 2.6. We will include them in a future release.

If you do not need IPv6, you can get rid of some problems by using --disable-ipv6
for configure. We hae only tested newer versions of Solaris.

Thank you again,
Best regards
Michael

On Friday, November 2, 2001, at 05:21 Uhr, J.W. Chang wrote:

Sorry for sending the following message again.
My e-mail client (MS Outlook Express) sends e-mails in Korean text encoding by default.
So my previous mail may have caused some problem with your e-mail programs. -- jwjang
------
Hello,

Currently I'm trying to port sctplib-pre14 to Solaris 2.6.
(It was very hard work since "configure" script of sctplib-pre14 seems to be tuned for
Solaris 7 or 8. Why Solaris 2.6? Please ask my boss. :-))

Anyway, I've found a bug from "adaptation.c". Take a look at adl_open_sctp_socket().
There is a local variable "opt_size" in integer type. Its address is passed to getsockopt()
as the last parameter, to retrieve the value of SO_RCVBUF socket option.
Here is the prototype of getsockopt():

int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);

According to the man page of getsockopt(), the last optlen is a kind of "value-result"
type of parameter. That is, value of optlen must be initialized as the size of buffer
pointed to by optval. Buf "opt_size" variable in "adaptation.c" is not initialized at all.
While it was no problem on my Linux, it caused problem on my Sun Ultra-10 with Solaris 2.6.
(getsockopt() fails.)
That can be quickly cured by initializing "opt_size" as sizeof(int).

Chang Jin-woong
jwjang AT telcoware.com

PS: It seems that Sol2.6 does not support RECVDSTADDR socket option. Does anyone
know RECVDSTADDR equivalent on Solaris 2.6/7/8? Thanks in advance.

v+ºË"¢yšŠX§‚X¬µØ¬rë,Š‰ìrÚ]zm§ÿðà ¶—^þf¢–f§þX¬¶)ߣ÷b±Ë¬²*'

Michael.Tuexen AT micmac.franken.de





Archive powered by MHonArc 2.6.19+.

Top of page