mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 05:55:11 +08:00
0faec4d050
If `__rtnl_talk_iov` fails then callers are not expected to free `answer`.
Currently if `NLMSG_ERROR` was received with an error then the netlink
buffer was stored in `answer`, while still returning an error
This leak can be observed by running this snippet over time.
This triggers an `NLMSG_ERROR` because for each neighbour update, `ip`
will try to query for the name of interface 9999 in the wrong netns.
(which in itself is a separate bug)
set -e
ip netns del test-a || true
ip netns add test-a
ip netns del test-b || true
ip netns add test-b
ip -n test-a netns set test-b auto
ip -n test-a link add veth_a index 9999 type veth \
peer name veth_b netns test-b
ip -n test-b link set veth_b up
ip -n test-a monitor link address prefix neigh nsid label all-nsid \
> /dev/null &
monitor_pid=$!
clean() {
kill $monitor_pid
ip netns del test-a
ip netns del test-b
}
trap clean EXIT
while true; do
ip -n test-b neigh add dev veth_b 1.2.3.4 lladdr AA:AA:AA:AA:AA:AA
ip -n test-b neigh del dev veth_b 1.2.3.4
done
Fixes:
|
||
---|---|---|
bash-completion | ||
bridge | ||
dcb | ||
devlink | ||
doc/actions | ||
etc/iproute2 | ||
examples/bpf | ||
genl | ||
include | ||
ip | ||
lib | ||
man | ||
misc | ||
netem | ||
rdma | ||
schema | ||
tc | ||
testsuite | ||
tipc | ||
vdpa | ||
.clang-format | ||
.gitignore | ||
.mailmap | ||
configure | ||
COPYING | ||
Makefile | ||
README | ||
README.devel |
This is a set of utilities for Linux networking. Information: https://wiki.linuxfoundation.org/networking/iproute2 Download: http://www.kernel.org/pub/linux/utils/net/iproute2/ Stable version repository: git://git.kernel.org/pub/scm/network/iproute2/iproute2.git Development repository: git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git How to compile this. -------------------- 1. libdbm arpd needs to have the berkeleydb development libraries. For Debian users this is the package with a name like libdbX.X-dev. DBM_INCLUDE points to the directory with db_185.h which is the include file used by arpd to get to the old format Berkeley database routines. Often this is in the db-devel package. 2. make The makefile will automatically build a config.mk file which contains definitions of libraries that may or may not be available on the system such as: ATM, ELF, MNL, and SELINUX. 3. include/uapi This package includes matching sanitized kernel headers because the build environment may not have up to date versions. See Makefile if you have special requirements and need to point at different kernel include files. Stephen Hemminger stephen@networkplumber.org Alexey Kuznetsov kuznet@ms2.inr.ac.ru