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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -