linux - Is it possible to modify interface index -


if kernel decides change interface index reason, our userspace code cached interface index not gets updated , starts dropping packet because mismatch between interface index cached in userspace , present in kernel.

i've used if_indextoname(index, interfacename) solve problem. kernel knows index maps correct interface name.

now comes requirement: need test code. there way can simulate index change can verify code? have gut feeling since index particular kernel can accessed calls(if_nametoindex()/etc.) can't change it. how validate changeset?

sysctl can't suggesting.

udev takes care of naming interfaces , though there few naming schemes there nothing change index.

if can read code have here:

http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -