[hipl-dev] Re: HIPL whitelisting

  • From: Christof Mroz <christof.mroz@xxxxxxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Tue, 21 Jun 2011 16:21:09 +0200

On Mon, 20 Jun 2011 21:08:08 +0200, Christian Röller (Student RWTH) <christian.roeller@xxxxxxxxxxxxxx> wrote:


My problem is, that at the moment the interfaces will be recognized by
an index, which is provided by netlink. The problem with this index is,
that it is equal for the physical interface and its alias-interfaces.

I'm too busy to investigate myself right now, but don't `ifconfig` and `ip` both use netlink as well? And IIRC, both are able to distinguish between aliases and interfaces, so there may be a solution in the respective source code.

So my question is:
Has anybody an idea, which other unique indicator(except the index) i
can use to distinguish between all inerfaces, so that i can whitelist
the interfaces in a more conrete way.

A quick glance at the rtnetlink(7) manpage looks like the interface name can be embedded in the relevant netlink messages as a string, see IFLA_IFNAME and IFA_LABEL. While I'd never believe what the netlink docs say, a quick grep through the kernel source looks like it actually honors these fields...

Other related posts: