--On 2002-01-20 11:30:01 -0800 [EMAIL PROTECTED] wrote:
>
> So this 'struct proc' argument can be NULL now?
> What about when calling other socket functions like socreate(), et. al.?
'struct proc' member in the struct sockopt can be NULL. As per the comment
in that structure, NULL means that the calling entity is the kernel, not a
user process (my interpretation):
struct sockopt {
enum sopt_dir sopt_dir; /* is this a get or a set? */
int sopt_level; /* second arg of [gs]etsockopt */
int sopt_name; /* third arg of [gs]etsockopt */
void *sopt_val; /* fourth arg of [gs]etsockopt */
size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */
struct proc *sopt_p; /* calling process or null if kernel */
};
This doesn't apply to socreate() since it isn't passed a 'struct sockopt'
as argument. From a quick glance, the socket functions that are concerned
are sosetopt() and sogetopt().
> If so, your fix looks like the right onw.
I will test the NGM_KSOCKET_GETOPT code path as I suspect that a similar
fix will be required.
Florent.
--
Florent Parent
Viagénie http://www.viagenie.qc.ca
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message