diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Devices/Network/slirp/udp.c | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Devices/Network/slirp/udp.c')
-rw-r--r-- | src/VBox/Devices/Network/slirp/udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/VBox/Devices/Network/slirp/udp.c b/src/VBox/Devices/Network/slirp/udp.c index 10685f95..e8ec3056 100644 --- a/src/VBox/Devices/Network/slirp/udp.c +++ b/src/VBox/Devices/Network/slirp/udp.c @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2010 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -123,7 +123,6 @@ udp_input(PNATState pData, register struct mbuf *m, int iphlen) * If not enough data to reflect UDP length, drop. */ len = RT_N2H_U16((u_int16_t)uh->uh_ulen); - Assert((ip->ip_len == len)); Assert((ip->ip_len + iphlen == m_length(m, NULL))); if (ip->ip_len != len) @@ -132,6 +131,7 @@ udp_input(PNATState pData, register struct mbuf *m, int iphlen) { udpstat.udps_badlen++; Log3(("NAT: IP(id: %hd) has bad size\n", ip->ip_id)); + goto bad_free_mbuf; } m_adj(m, len - ip->ip_len); ip->ip_len = len; @@ -277,7 +277,7 @@ udp_input(PNATState pData, register struct mbuf *m, int iphlen) * DNS proxy */ if ( pData->fUseDnsProxy - && (ip->ip_dst.s_addr == RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_DNS)) + && CTL_CHECK(ip->ip_dst.s_addr, CTL_DNS) && (uh->uh_dport == RT_H2N_U16_C(53))) { dnsproxy_query(pData, so, m, iphlen); |