Re: AF_UNIX MSG_PEEK bug?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Brent Casavant <bcasavan@...>
Cc: <netdev@...>, David Miller <davem@...>, <linux-kernel@...>
Date: Tuesday, January 8, 2008 - 6:40 pm

Potential bugs notwithstanding, given that this is a STREAM socket, and 
as such shouldn't (I hope, or I'm eating toes for dinner again) have 
side effects like tossing the rest of a datagram, why are you using 
MSG_PEEK?  Why not simply read the N bytes of the message that will have 
the message length with a normal read/recv, and then read that many 
bytes in the next call?

rick jones
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
AF_UNIX MSG_PEEK bug?, Brent Casavant, (Tue Jan 8, 6:27 pm)
Re: AF_UNIX MSG_PEEK bug?, Tetsuo Handa, (Wed Jan 9, 7:04 am)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Wed Jan 9, 2:01 pm)
Re: AF_UNIX MSG_PEEK bug?, Herbert Xu, (Wed Jan 9, 8:01 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Wed Jan 9, 10:50 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Thu Jan 10, 6:35 pm)
Re: AF_UNIX MSG_PEEK bug?, Alan Cox, (Thu Jan 10, 6:36 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Wed Jan 9, 9:19 pm)
Re: AF_UNIX MSG_PEEK bug?, Rick Jones, (Tue Jan 8, 6:40 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Tue Jan 8, 7:20 pm)
Re: AF_UNIX MSG_PEEK bug?, Tom Spink, (Tue Jan 8, 6:53 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Tue Jan 8, 7:18 pm)
Re: AF_UNIX MSG_PEEK bug?, Tom Spink, (Tue Jan 8, 7:39 pm)
Re: AF_UNIX MSG_PEEK bug?, Tom Spink, (Tue Jan 8, 7:46 pm)
Re: AF_UNIX MSG_PEEK bug?, Brent Casavant, (Tue Jan 8, 8:08 pm)