register struct inpcb *inp;
struct inpcb *last = 0;
struct mbuf *opts = 0;
- short need_wakeup = 0;
ripsrc.sin_addr = ip->ip_src;
LIST_FOREACH(inp, &ripcb, inp_list) {
m_freem(opts);
} else {
/* kprintf("rip_input calling sorwakeup\n"); */
- need_wakeup++;
+ sorwakeup(last->inp_socket);
}
opts = 0;
}
m_freem(opts);
} else {
/* kprintf("rip_input calling sorwakeup\n"); */
- need_wakeup++;
+ sorwakeup(last->inp_socket);
}
} else {
m_freem(m);
ipstat.ips_noproto++;
ipstat.ips_delivered--;
}
- if (need_wakeup)
- sorwakeup(last->inp_socket);
}
/*
error = SYSCTL_OUT(req, &xig, sizeof xig);
if (error)
return error;
+ /*
+ * We are done if there is no pcb
+ */
+ if (n == 0)
+ return 0;
inp_list = _MALLOC(n * sizeof *inp_list, M_TEMP, M_WAITOK);
if (inp_list == 0)