]> git.proxmox.com Git - mirror_iproute2.git/commit
lib/ll_map: Choose size of new cache items at run-time
authorPhil Sutter <phil@nwl.cc>
Thu, 24 Aug 2017 09:51:50 +0000 (11:51 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 24 Aug 2017 21:53:14 +0000 (14:53 -0700)
commit4b9e91782269fc871d158ed4f11bfcfe4e3b8bf7
tree6a869a90de83dd352e0e4a349e9df7c42a3acca0
parent56270e54661e8ca51d4b3661b9f9bb12a0a40d95
lib/ll_map: Choose size of new cache items at run-time

Instead of having a fixed buffer of 16 bytes for the interface name,
tailor size of new ll_cache entry using the interface name's actual
length. This also makes sure the following call to strcpy() is safe.

Signed-off-by: Phil Sutter <phil@nwl.cc>
lib/ll_map.c