--On 2002-01-18 21:30:00 -0800 [EMAIL PROTECTED] wrote:
>> netgraph: sendto(.dummy): Bad address
>
> Hmm.. I wonder if the problem is that this has never worked :-)
That would explain why I couldn't find any examples on using this ;-)
> That is, maybe setsockopt() is expecting the value pointer to point
> into user memory, while ng_ksocket is using a pointer that points
> into kernel memory?
>
> In which case, I don't know how to go about fixing it.. Julian?
This is what I did to make it work for me. A better fix would probably be
around the struct proc definition. If fact, you had noted "broken"
probably as a memo to fix something here...
struct proc *p = curproc ? curproc : &proc0; /* XXX broken */
*** ng_ksocket.c.orig Sat Jan 19 11:05:28 2002
--- ng_ksocket.c Sat Jan 19 11:45:23 2002
***************
*** 759,765 ****
sopt.sopt_name = ksopt->name;
sopt.sopt_val = ksopt->value;
sopt.sopt_valsize = valsize;
! sopt.sopt_p = p;
error = sosetopt(so, &sopt);
break;
}
--- 759,765 ----
sopt.sopt_name = ksopt->name;
sopt.sopt_val = ksopt->value;
sopt.sopt_valsize = valsize;
! sopt.sopt_p = 0;
error = sosetopt(so, &sopt);
break;
}
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