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?
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/31025
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
Gerrit-Change-Number: 31025
Gerrit-PatchSet: 12
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 11:08:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment