aboutsummaryrefslogtreecommitdiff
path: root/slirp/arp_table.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-14slirp: replace DEBUG_ARGS with DEBUG_ARGMarc-André Lureau1-6/+6
There is no clear benefit in calling an alias DEBUG_ARGS(). Replace calls with DEBUG_ARG(), and fix the white-spacing while at it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-01-14slirp: improve a bit the debug macrosMarc-André Lureau1-6/+6
Let them accept multiple arguments. Simplify the inner argument handling of DEBUG_ARGS/DEBUG_MISC_DEBUG_ERROR. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-05-31slirp/debug: Print IP addresses in human readable formAlexey Kardashevskiy1-2/+2
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-05-20slirp/debug: Print IP addresses in human readable formAlexey Kardashevskiy1-2/+2
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-02-04slirp: Clean up includesPeter Maydell1-0/+1
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-10-git-send-email-peter.maydell@linaro.org
2014-06-09slirp/arp: do not special-case bogus IP addressesSamuel Thibault1-9/+1
Do not special-case addresses with zero host part, as we do not necessarily know how big it is, and the guest can fake them anyway. Silently avoid having 0.0.0.0 as a destination, however. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> [Edgar: Minor change to subject] Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2013-09-01slirp/arp_table.c: Avoid shifting into sign bit of signed integersPeter Maydell1-2/+2
"0xf << 28" shifts right into the sign bit, since 0xf is a signed integer. Use the 'U' suffix to force an unsigned shift to avoid this undefined behaviour and a clang sanitizer warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-11-15slirp: Don't crash on packets from 0.0.0.0/8.Nickolai Zeldovich1-1/+3
LWIP can generate packets with a source of 0.0.0.0, which triggers an assertion failure in arp_table_add(). Instead of crashing, simply return to avoid adding an invalid ARP table entry. Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-05slirp: Fix types of IP address parametersJan Kiszka1-8/+8
Should be uint32_t for IPv4, not int. Also avoid in_addr_t without proper includes. Fixes build regression on mingw32. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-03Simple ARP tableFabien Chouteau1-0/+95
This patch adds a simple ARP table in Slirp and also adds handling of gratuitous ARP requests. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>