Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 )
Change subject: Introduce tundev API ......................................................................
Patch Set 12:
(2 comments)
File src/core/tun.c:
https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/97f47869_9a592383 PS12, Line 402: if_index = if_nametoindex(dev_name); : if (if_index == 0) : return -ENODEV; I think it's dangerous to use the string as a persistent/permanent identifier for a network device. That's what the ifindex is normally used for. It is unique even across device renames. Is there a specific reeason why you're not storing the ifindex in the local state structure and use that every time another operation is performed?
It looks a bit odd that every API function here first performs a name-to-ifindex translation.
https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/df828b70_9a74e190 PS12, Line 639: / what's this about?