summaryrefslogtreecommitdiffstats
path: root/slirp/arp_table.c
Commit message (Collapse)AuthorAgeFilesLines
* slirp/arp_table.c: Avoid shifting into sign bit of signed integersPeter Maydell2013-09-011-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>
* slirp: Don't crash on packets from 0.0.0.0/8.Nickolai Zeldovich2012-11-151-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>
* slirp: Fix types of IP address parametersJan Kiszka2011-08-051-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>
* Simple ARP tableFabien Chouteau2011-08-031-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>