version 1.174, 2018/04/12 07:28:10 |
version 1.175, 2018/04/12 07:45:29 |
|
|
|
|
static void |
static void |
rip_sbappendaddr(struct inpcb *last, struct ip *ip, const struct sockaddr *sa, |
rip_sbappendaddr(struct inpcb *last, struct ip *ip, const struct sockaddr *sa, |
int hlen, struct mbuf *opts, struct mbuf *n) |
int hlen, struct mbuf *n) |
{ |
{ |
|
struct mbuf *opts = NULL; |
|
|
if (last->inp_flags & INP_NOHEADER) |
if (last->inp_flags & INP_NOHEADER) |
m_adj(n, hlen); |
m_adj(n, hlen); |
if (last->inp_flags & INP_CONTROLOPTS |
if (last->inp_flags & INP_CONTROLOPTS || |
|| SOOPT_TIMESTAMP(last->inp_socket->so_options)) |
SOOPT_TIMESTAMP(last->inp_socket->so_options)) |
ip_savecontrol(last, &opts, ip, n); |
ip_savecontrol(last, &opts, ip, n); |
if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) { |
if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) { |
soroverflow(last->inp_socket); |
soroverflow(last->inp_socket); |
m_freem(n); |
m_freem(n); |
if (opts) |
if (opts) |
m_freem(opts); |
m_freem(opts); |
} else |
} else { |
sorwakeup(last->inp_socket); |
sorwakeup(last->inp_socket); |
|
} |
} |
} |
|
|
/* |
/* |
Line 167 rip_input(struct mbuf *m, ...) |
|
Line 170 rip_input(struct mbuf *m, ...) |
|
struct inpcb_hdr *inph; |
struct inpcb_hdr *inph; |
struct inpcb *inp; |
struct inpcb *inp; |
struct inpcb *last = NULL; |
struct inpcb *last = NULL; |
struct mbuf *n, *opts = NULL; |
struct mbuf *n; |
struct sockaddr_in ripsrc; |
struct sockaddr_in ripsrc; |
va_list ap; |
va_list ap; |
|
|
Line 209 rip_input(struct mbuf *m, ...) |
|
Line 212 rip_input(struct mbuf *m, ...) |
|
} |
} |
#endif |
#endif |
else if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { |
else if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { |
rip_sbappendaddr(last, ip, sintosa(&ripsrc), hlen, opts, |
rip_sbappendaddr(last, ip, sintosa(&ripsrc), hlen, n); |
n); |
|
opts = NULL; |
|
} |
} |
|
|
last = inp; |
last = inp; |
Line 225 rip_input(struct mbuf *m, ...) |
|
Line 226 rip_input(struct mbuf *m, ...) |
|
} else |
} else |
#endif |
#endif |
if (last != NULL) { |
if (last != NULL) { |
rip_sbappendaddr(last, ip, sintosa(&ripsrc), hlen, opts, m); |
rip_sbappendaddr(last, ip, sintosa(&ripsrc), hlen, m); |
} else if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) { |
} else if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) { |
uint64_t *ips; |
uint64_t *ips; |
|
|