Subject: Re: [patch iproute2 v8 1/2] lib/libnetlink: Add functions rtnl_talk_msg and rtnl_talk_iov

From: Phil Sutter <[email-masked]>
Date: Wed, 10 Jan 2018 21:12:45 +0100

On Wed, Jan 10, 2018 at 12:20:36PM -0700, David Ahern wrote:
[...]
> 2. I am using a batch file with drop filters:
> 
> filter add dev eth2 ingress protocol ip pref 273 flower dst_ip
> 192.168.253.0/16 action drop
> 
> and for each command tc is trying to dlopen m_drop.so:
> 
> open("/usr/lib/tc//m_drop.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such
> file or directory)

[...]

> Can you look at a follow on patch (not part of this set) to cache status
> of dlopen attempts?

IMHO the logic used in get_action_kind() for gact is the culprit here:
After trying to dlopen m_drop.so, it dlopens m_gact.so although it is
present already. (Unless I missed something.)

I guess the better (and easier) fix would be to create some more struct
action_util instances in m_gact.c for the primitives it supports so that
the lookup in action_list succeeds for consecutive uses. Note that
parse_gact() even supports this already.

Cheers, Phil