[systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

Lennart Poettering lennart at poettering.net
Wed Oct 22 03:19:01 PDT 2014


On Sat, 13.09.14 20:40, Tom Gundersen (teg at jklm.no) wrote:

> Yeah, this could happen. It so happens that the loopback link will
> always have ifindex 1, so I guess we could just fall back to checking
> for that if we don't have the real flags.

Is that true even in network namespaces? Is this really exported API?
I really don't want to rely on behaviour here that is not considered
official API of Linux.

If it is safe API of Linux, then we really should drop
manager_ifindex_is_loopback() entirely, and just always compare the
ifindex.

Anyone has some pointers where this is made API?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list