Thomas Parrott
bfc01164eb
network: Removes unused ip_proxy_args
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 13:01:36 +01:00
Thomas Parrott
1ee07848e7
network: Fix coverity issue, dont initialise string pointers in setup_veth_ovs_bridge_vlan
...
This is needed by lxc_ovs_setup_bridge_vlan_exec.
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 12:03:40 +01:00
Thomas Parrott
785e15403e
network: Fix coverity issue, leaking data in lxc_ovs_setup_bridge_vlan_exec
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 12:03:06 +01:00
Thomas Parrott
4e61b19d62
confile: Fix coverity issue, missing return in get_config_net_veth_vlan_tagged_id
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 12:01:41 +01:00
Christian Brauner
677c9967b1
Merge pull request #3439 from tomponline/tp-nic-veth-vlan-ovs
...
NIC: Veth OVS bridge VLAN support
2020-06-09 11:38:36 +02:00
Thomas Parrott
38790036a8
network: Updates instantiate_veth to support OVS VLAN setup
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 10:07:56 +01:00
Thomas Parrott
8f7c3358ac
network: Adds OVS VLAN setup functions
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 10:07:56 +01:00
Thomas Parrott
df62850d2a
network: Updates netlink_open handling in lxc_ipvlan_create
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:58:32 +01:00
Thomas Parrott
a789ca4c24
doc: Adds documentation for veth vlan bridge options
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:58:32 +01:00
Thomas Parrott
33320936d5
network: Updates instantiate_veth to set bridge vlan settings
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:58:32 +01:00
Thomas Parrott
622f05c738
network: Adds bridge vlan management functions
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
5ca374db08
tests: Adds test for lxc.net.0.veth.vlan.tagged.id config key
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
9262d64681
tests: Adds test for bridge vlan "none" value
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
8abd96020a
tests: Adds test for lxc.net.0.veth.vlan.id config key
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
3a0049f3d2
confile/utils: Adds freeing of priv.veth_attr.vlan_tagged_ids
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
1f92ddc1a0
confile/utils: Adds veth vlan tagged ID tracing to lxc_log_configured_netdevs
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
134ded24d0
confile/utils: Adds veth mode and vlan ID tracing to lxc_log_configured_netdevs
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
b8e06d332b
confile: Adds validation for lxc.net.veth.vlan.tagged.id
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:06 +01:00
Thomas Parrott
fdf76c6df5
confile: Adds validation for lxc.net.veth.vlan.id
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 09:40:05 +01:00
Thomas Parrott
c96a27f739
network: Adds veth vlan_id, vlan_id_set and vlan_tagged_ids
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
2abd5206d7
macro: Adds BRIDGE_VLAN_ID_MAX constant
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
53a9ba7ff4
macro: Adds constant for BRIDGE_VLAN_NONE mode
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
59315a0681
macro: Adds bridge VLAN constants
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
d80ff1fac7
api/extensions: Adds network_bridge_vlan API extension
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
26da53c3ac
network: Adds check for bridge link interface existence in instantiate_veth
...
To avoid misleading errors about openvswitch when non-existent bridge link interface specified.
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Thomas Parrott
372adece8b
macro: Adds UINT_TO_PTR and PTR_TO_USHORT helpers
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-08 13:27:07 +01:00
Christian Brauner
bdf4616595
Merge pull request #3434 from tomponline/tp-copying
...
.gitignore: Ignores COPYING file created by make
2020-06-03 12:54:32 +02:00
Thomas Parrott
5d34397461
.gitignore: Ignores COPYING file created by make
...
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-03 11:16:11 +01:00
Christian Brauner
a65e1458d2
Merge pull request #3432 from smoser/fix/lxc-usernsexec-test-do-create-user
...
lxc-test-usernsexec: If user is root, then create and use non-root user.
2020-06-02 15:03:36 +02:00
Scott Moser
4c93c06e9f
lxc-test-usernsexec: If user is root, then create and use non-root user.
...
Previously if the user was root, then the test would just skip
running (and exit 0). The lxc test environment is run as root.
So, instead of never doing anything there, we create a user,
make sure it is in /etc/sub{ug}id and then execute the test as that
user.
If user is already non-root, then just execute the tests as before.
Signed-off-by: Scott Moser <smoser@brickies.net>
2020-06-01 12:33:58 -04:00
Stéphane Graber
a3ab5b5d10
Merge pull request #3428 from smoser/test/add-usernsexec-test
...
Add test of lxc-usernsexec
2020-05-29 16:42:04 -04:00
Scott Moser
9026f5c25e
Add test of lxc-usernsexec
...
The test executes lxc-usernsexec to create some files and chmod them.
Then makes assertions on the uid and gid of those files from outside.
Signed-off-by: Scott Moser <smoser@brickies.net>
2020-05-29 15:52:30 -04:00
Stéphane Graber
d4ff364247
Merge pull request #3424 from brauner/2020-05-25/fixes
...
api_extensions: add "pidfd"
2020-05-25 14:03:32 -04:00
Christian Brauner
71d53a5ca7
api_extensions: add "pidfd"
...
Somehow it's documented but wasn't ever added.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-25 19:49:10 +02:00
Stéphane Graber
445f47ead8
travis: Restrict coverity to gcc on bionic on amd64
...
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-05-22 13:28:24 -04:00
Stéphane Graber
fbe48de489
Merge pull request #3422 from brauner/2020-05-20/usernsexec_fixes
...
lxc-usernsexec: improvements
2020-05-20 08:54:42 -04:00
Christian Brauner
158d119f90
lxc-usernsexec: don't fail on setgroups()
...
We can fail to setgroups() when "deny" has been set which we need to set when
we are a fully unprivileged user.
Closes: 3420.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-20 12:15:02 +02:00
Christian Brauner
7cf6e24d07
lxc-usernsexec: dumb down from error to warning message
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-20 12:10:54 +02:00
Christian Brauner
2b5d8a439c
Merge pull request #3419 from brauner/2020-05-19/network_phys_fixes
...
network: use __instantiate_ns_common() in instantiate_ns_phys() too
2020-05-19 10:33:55 +02:00
Christian Brauner
9d0406c79d
network: use __instantiate_ns_common() in instantiate_ns_phys() too
...
Fixes: https://lists.linuxcontainers.org/pipermail/lxc-users/2020-May/015245.html
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-19 09:09:40 +02:00
Stéphane Graber
b23d806cb2
Merge pull request #3418 from brauner/2020-05-18/android_fixes
...
bionic: s/lxc_raw_execveat()/execveat()/g
2020-05-18 14:19:10 -04:00
Christian Brauner
b164903bcd
bionic: s/lxc_raw_execveat()/execveat()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-18 20:02:37 +02:00
Stéphane Graber
fe2227c9fa
Merge pull request #3417 from brauner/2020-05-15/fixes
...
network: fix {mac,ip,v}lan device creation
2020-05-18 12:41:21 -04:00
Christian Brauner
9f8cf6e110
network: fix {mac,ip,v}lan device creation
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-18 17:11:26 +02:00
Stéphane Graber
7c1970fa70
Merge pull request #3415 from brauner/2020-05-15/fixes
...
network: restore old behavior
2020-05-17 21:35:35 -04:00
Christian Brauner
717f77f2f3
network: restore old behavior
...
I introduced a regression: when users didn't specify a specific name via
lxc.net.<idx>.name then the device would retain the random name it received
when we created it. Before we would use the "eth%d" syntax to get the kernel to
assign a fixed name. Restore that behavior.
Closes : #3407 .
Fixes: 8bf64b77ac
("network: rework network device creation")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-15 21:17:48 +02:00
Serge Hallyn
c0bdef23eb
Merge pull request #3412 from brauner/2020-05-15/clone3
...
clone3: add infrastructure and switch container creation to it
2020-05-15 14:01:35 -05:00
Christian Brauner
748166a39b
Merge pull request #3414 from Blub/get-cgroup-path-compat
...
improve LXC_CMD_GET_CGROUP compatibility
2020-05-15 19:14:11 +02:00
Wolfgang Bumiller
400d579e69
improve LXC_CMD_GET_CGROUP compatibility
...
When a newer lxc library communicates with an older one
(such as running an lxc 4.0 lxc-freeze on a longer running
container which was started while lxc was still at version
3), the LXC_CMD_GET_LIMITING_CGROUP command is not
available, causing the remote to just close the socket.
Catch this and try the previous command instead.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-15 16:33:34 +02:00
Christian Brauner
04a49a1452
cgroups: be less alarming when creating cgroups
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-05-15 16:08:31 +02:00