Feature #309
Problem with Network Aliases for charon.interfaces_ignore and charon.interfaces_use
Description
It does not appear that these configuration options support network aliases (e.g. eth0:1, eth0:2).
Is there a workaround for this?
Related issues
History
#1 Updated by Tobias Brunner almost 8 years ago
- Tracker changed from Bug to Feature
- Category set to libhydra
- Status changed from New to Feedback
- Assignee set to Tobias Brunner
It does not appear that these configuration options support network aliases (e.g. eth0:1, eth0:2).
Is there a workaround for this?
Currently not. Network device aliases are a rather dated concept and are actually deprecated (see Documentation/networking/alias.txt
in the Linux kernel sources). Since they are no real interfaces filtering them via charon.interfaces_ignore|use
doesn't work at the moment.
In modern terminology the aliases are actually labels that are stored together with an IP address that is added to a device (multiple addresses can share the same label).
For instance, using iproute2
the following can be used to create an "alias" eth0:foo
.
sudo ip addr add 192.168.1.x/24 dev eth0 label eth0:foo
ifconfig
will list this as separate "device" but it is actually not. Which is why iproute2
simply lists it as one of the addresses of the eth0
device (ifconfig
only shows the first address with a certain label).
All this considered, we could theoretically use the label that is stored with an IP address and apply the interface filter to it. But that'd require quite some work as interfaces and addresses are currently handled separately (i.e. you currently can't ignore eth0
without implicitly ignoring all addresses on it, even if you didn't explicitly ignore an alias). A separate filtering mechanism might be an option. Something like charon.ip_label_ignore|use
, but since this is very Linux/Netlink specific charon.plugins.kernel-netlink.ip_label_ignore|use
might be a better name.
#2 Updated by Davidok ok almost 8 years ago
I realized as such, thanks for your response.