asked to append nothing at end); change u.u_cprocp to curproc
SCCS-vsn: sys/net/rtsock.c 7.17
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)rtsock.c 7.16 (Berkeley) %G%
+ * @(#)rtsock.c 7.17 (Berkeley) %G%
*/
#include "param.h"
#include "mbuf.h"
*/
#include "param.h"
#include "mbuf.h"
#include "proc.h"
#include "socket.h"
#include "socketvar.h"
#include "domain.h"
#include "protosw.h"
#include "proc.h"
#include "socket.h"
#include "socketvar.h"
#include "domain.h"
#include "protosw.h"
#include "af.h"
#include "if.h"
#include "af.h"
#include "if.h"
m_copydata(m, 0, len, (caddr_t)rtm);
if (rtm->rtm_version != RTM_VERSION)
senderr(EPROTONOSUPPORT);
m_copydata(m, 0, len, (caddr_t)rtm);
if (rtm->rtm_version != RTM_VERSION)
senderr(EPROTONOSUPPORT);
- rtm->rtm_pid = u.u_procp->p_pid;
+ rtm->rtm_pid = curproc->p_pid;
lim = len + (caddr_t) rtm;
cp = (caddr_t) (rtm + 1);
if (rtm->rtm_addrs & RTA_DST) {
lim = len + (caddr_t) rtm;
cp = (caddr_t) (rtm + 1);
if (rtm->rtm_addrs & RTA_DST) {
- while (off >= (mlen = m->m_len)) {
+ while (off > (mlen = m->m_len)) {
off -= mlen;
totlen += mlen;
if (m->m_next == 0) {
off -= mlen;
totlen += mlen;
if (m->m_next == 0) {
rtm->rtm_type = type;
rtm->rtm_addrs = RTA_DST;
if (type == RTM_OLDADD || type == RTM_OLDDEL) {
rtm->rtm_type = type;
rtm->rtm_addrs = RTA_DST;
if (type == RTM_OLDADD || type == RTM_OLDDEL) {
- rtm->rtm_pid = u.u_procp->p_pid;
+ rtm->rtm_pid = curproc->p_pid;
}
m_copyback(m, sizeof (*rtm), dlen, (caddr_t)dst);
if (gate) {
}
m_copyback(m, sizeof (*rtm), dlen, (caddr_t)dst);
if (gate) {