Socket so_linger setting

2002-11-01 Thread Michael Sinz
During some parameter limit checking work, I ran into what I believe to be an error in FreeBSD. (Albeit unlikely to be hit) A setsockopt of the SO_LINGER field will cause strange results if the value is set above 32767. This is due to the fact that in struct socket, the so_linger field is a sign

Re: Socket so_linger setting

2002-11-01 Thread Matthew Dillon
I think your patch is fine as is, Mike! Good find! Even though so_linger cannot be negative, it is often convenient to use a signed integer to store the value to avoid unexpected arithmatic results when mixing with signed operations. My quick perusal does not show any cases

Re: Socket so_linger setting

2002-11-01 Thread Michael Sinz
Matthew Dillon wrote: I think your patch is fine as is, Mike! Good find! Even though so_linger cannot be negative, it is often convenient to use a signed integer to store the value to avoid unexpected arithmatic results when mixing with signed operations. My quick perusal does

Re: Socket so_linger setting

2002-11-11 Thread Michael Sinz
Matthew Dillon wrote: I think your patch is fine as is, Mike! Good find! Even though so_linger cannot be negative, it is often convenient to use a signed integer to store the value to avoid unexpected arithmatic results when mixing with signed operations. My quick perusal does

Re: Socket so_linger setting

2002-11-11 Thread Matthew Dillon
I was going to wait till 5.0 released first but I could do it now if you want. -Matt : :Matthew Dillon wrote: :> I think your patch is fine as is, Mike! Good find! Even though :> so_linger cannot be negative, it is often convenient to use

Re: Socket so_linger setting

2002-11-11 Thread Michael Sinz
Matthew Dillon wrote: I was going to wait till 5.0 released first but I could do it now if you want. It would help the Java work but I don't know if it is critical to be done "today" vs some short time in the future. (Depends on the timing of the Java project and the wish to get JCK cer