mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 19:29:15 +00:00
network: remove faulty restriction
Reported-by: Thomas Parrott <thomas.parrott@canonical.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
4f71ecb85e
commit
e318f2c1a3
@ -3487,7 +3487,6 @@ static int lxc_setup_netdev_in_child_namespaces(struct lxc_netdev *netdev)
|
|||||||
{
|
{
|
||||||
char ifname[IFNAMSIZ];
|
char ifname[IFNAMSIZ];
|
||||||
int err;
|
int err;
|
||||||
const char *net_type_name;
|
|
||||||
char *current_ifname = ifname;
|
char *current_ifname = ifname;
|
||||||
char bufinet4[INET_ADDRSTRLEN], bufinet6[INET6_ADDRSTRLEN];
|
char bufinet4[INET_ADDRSTRLEN], bufinet6[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
@ -3508,13 +3507,6 @@ static int lxc_setup_netdev_in_child_namespaces(struct lxc_netdev *netdev)
|
|||||||
if (netdev->type == LXC_NET_NONE)
|
if (netdev->type == LXC_NET_NONE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (netdev->type != LXC_NET_VETH) {
|
|
||||||
net_type_name = lxc_net_type_to_str(netdev->type);
|
|
||||||
ERROR("%s networks are not supported for containers "
|
|
||||||
"not setup up by privileged users", net_type_name);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
netdev->ifindex = if_nametoindex(netdev->created_name);
|
netdev->ifindex = if_nametoindex(netdev->created_name);
|
||||||
if (!netdev->ifindex)
|
if (!netdev->ifindex)
|
||||||
SYSERROR("Failed to retrieve ifindex for network device with name %s",
|
SYSERROR("Failed to retrieve ifindex for network device with name %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user