Tyler Retzlaff
2014-07-06 18:16:41 UTC
hello,
recently effort is being undertaken to separate out functions being
dispatched through the generic pr_usrreq() switches. as a result some
inconsistencies have been identified in failure / return of PRU_SENSE
requests (i.e. stat(2)).
issue #1 so_pcb is NULL
across the range of protocols there is inconsistency in whether or not
the so_pcb being NULL is an error.
for protocols that allocate a pcb in attach should it ever be valid
for socket->so_pcb to be NULL (except upon entry to attach)?
currently only tcp & rip6 deviate from this expectation. tcp because of
pr/46077 (which made PRU_SENSE not fail) and rip6 is probably just wrong.
issue #2 PRU_SENSE / stat(2) returning success, a lot
most implementations of pr_stat don't fill any values / change the
passed in struct stat *ub in any way but some of them return 0
(success) and some of them return EOPNOTSUPP.
i'd like to suggest that for all the cases where struct stat *ub is
not being filled in they be changed to EOPNOTSUPP because it seems
a bit wrong to do nothing at all and then claim success.
comments, clarification, education invited
thanks
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
recently effort is being undertaken to separate out functions being
dispatched through the generic pr_usrreq() switches. as a result some
inconsistencies have been identified in failure / return of PRU_SENSE
requests (i.e. stat(2)).
issue #1 so_pcb is NULL
across the range of protocols there is inconsistency in whether or not
the so_pcb being NULL is an error.
for protocols that allocate a pcb in attach should it ever be valid
for socket->so_pcb to be NULL (except upon entry to attach)?
currently only tcp & rip6 deviate from this expectation. tcp because of
pr/46077 (which made PRU_SENSE not fail) and rip6 is probably just wrong.
issue #2 PRU_SENSE / stat(2) returning success, a lot
most implementations of pr_stat don't fill any values / change the
passed in struct stat *ub in any way but some of them return 0
(success) and some of them return EOPNOTSUPP.
i'd like to suggest that for all the cases where struct stat *ub is
not being filled in they be changed to EOPNOTSUPP because it seems
a bit wrong to do nothing at all and then claim success.
comments, clarification, education invited
thanks
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de