Sverre Froyen
2009-06-26 20:07:04 UTC
(1) It seems to me that adding the "httpready" filter a second time is
not really an error and I'm wondering if setsockopt could be modified to
silently ignore the second attempt.
I see the following code in kern/uipc_accf.cnot really an error and I'm wondering if setsockopt could be modified to
silently ignore the second attempt.
/*
* Require a listen socket; don't try to replace an existing filter
* without first removing it.
*/
solock(so);
if ((so->so_options & SO_ACCEPTCONN) == 0 || so->so_accf != NULL) {
error = EINVAL;
goto out;
}
which seems to imply that the behaviour you see is purposeful.. does
FreeBSD allow implicit replacement of the filter?
makes setsockopt silently ignore the second call. Please note that I do not
allow replacing a filter with a different type, only adding the same type
twice.
Regards,
Sverre