Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v retrieving revision 1.88.4.2 retrieving revision 1.89 diff -u -p -r1.88.4.2 -r1.89 --- src/sys/netinet/raw_ip.c 2006/09/09 02:58:47 1.88.4.2 +++ src/sys/netinet/raw_ip.c 2006/05/14 21:19:34 1.89 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.88.4.2 2006/09/09 02:58:47 rpaulo Exp $ */ +/* $NetBSD: raw_ip.c,v 1.89 2006/05/14 21:19:34 elad Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.88.4.2 2006/09/09 02:58:47 rpaulo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.89 2006/05/14 21:19:34 elad Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -141,6 +141,7 @@ rip_input(struct mbuf *m, ...) { int proto; struct ip *ip = mtod(m, struct ip *); + struct inpcb_hdr *inph; struct inpcb *inp; struct inpcb *last = 0; struct mbuf *opts = 0; @@ -166,7 +167,8 @@ rip_input(struct mbuf *m, ...) ip->ip_len = ntohs(ip->ip_len) - (ip->ip_hl << 2); NTOHS(ip->ip_off); - CIRCLEQ_FOREACH(inp, &rawcbtable.inpt_queue, inp_queue) { + CIRCLEQ_FOREACH(inph, &rawcbtable.inpt_queue, inph_queue) { + inp = (struct inpcb *)inph; if (inp->inp_af != AF_INET) continue; if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != proto) @@ -504,15 +506,17 @@ rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *control, struct lwp *l) { struct inpcb *inp; + struct proc *p; int s; int error = 0; #ifdef MROUTING extern struct socket *ip_mrouter; #endif + p = l ? l->l_proc : NULL; if (req == PRU_CONTROL) return (in_control(so, (long)m, (caddr_t)nam, - (struct ifnet *)control, l)); + (struct ifnet *)control, p)); if (req == PRU_PURGEIF) { in_pcbpurgeif0(&rawcbtable, (struct ifnet *)control); @@ -539,8 +543,8 @@ rip_usrreq(struct socket *so, int req, error = EISCONN; break; } - if (l == 0 || (error = kauth_authorize_generic(l->l_cred, - KAUTH_GENERIC_ISSUSER, &l->l_acflag))) { + if (p == 0 || (error = kauth_authorize_generic(p->p_cred, + KAUTH_GENERIC_ISSUSER, &p->p_acflag))) { error = EACCES; break; }