mirror of https://github.com/F-Stack/f-stack.git
The network stack has been modified to fix incorrect or invalid IP
addresses if multiple threads emit a UDP log_in_vain message concurrently. Corresponding upstream changeset from https://svnweb.freebsd.org/base?view=revision&revision=313523.
This commit is contained in:
parent
d6e6a7ee89
commit
56d87bf891
|
@ -674,13 +674,13 @@ udp_input(struct mbuf **mp, int *offp, int proto)
|
|||
INPLOOKUP_RLOCKPCB, ifp, m);
|
||||
if (inp == NULL) {
|
||||
if (udp_log_in_vain) {
|
||||
char buf[4*sizeof "123"];
|
||||
char src[INET_ADDRSTRLEN];
|
||||
char dst[INET_ADDRSTRLEN];
|
||||
|
||||
strcpy(buf, inet_ntoa(ip->ip_dst));
|
||||
log(LOG_INFO,
|
||||
"Connection attempt to UDP %s:%d from %s:%d\n",
|
||||
buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src),
|
||||
ntohs(uh->uh_sport));
|
||||
inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport),
|
||||
inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport));
|
||||
}
|
||||
UDPSTAT_INC(udps_noport);
|
||||
if (m->m_flags & (M_BCAST | M_MCAST)) {
|
||||
|
|
Loading…
Reference in New Issue