Commit Graph

9423 Commits

Author SHA1 Message Date
Christian Brauner
992a0a6799
test: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
f1d358b08a
doc: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
41e1294552
CODING_STYLE: adapt code example
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
a143f4a563
openpty: adapt variable naming
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-20 00:03:29 +02:00
Christian Brauner
8ed01f3c00
Merge pull request #3453 from stgraber/master
network: Rename primary to master
2020-06-18 17:56:52 +02:00
Stéphane Graber
0dc9a1425e
network: Rename primary to master
The previous change made things confusing by impliying there may be a
secondary when VLAN/IPVLAN/bridge members can only have a single parent
device.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-18 10:28:57 -04:00
Stéphane Graber
3d88831c53
Revert "nl: fix memory leak"
This reverts commit 9d05339487.

This causes a double-free as the variable is already using __do_free.

Closes #3452

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-18 10:22:44 -04:00
Christian Brauner
2410ff119c
tree-wide: use "primary" in networking code
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-18 10:06:55 +02:00
Christian Brauner
9e61fb1f70
tree-wide: wipe references to questionable apis from our public logs
We can't do anything about the established kernel API but we can at least not
propagate the terminology.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-18 10:05:10 +02:00
Christian Brauner
cecf3e8368
tree-wide: use "ptmx" and "pts" as terminal terms
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-17 23:58:59 +02:00
Christian Brauner
ce755129a9
Merge pull request #3449 from gaurav1086/nl_fix_mem_leak
nl: fix memory leak
2020-06-17 23:15:25 +02:00
Christian Brauner
92eeb4ea6b
Merge pull request #3450 from gaurav1086/containertests_fix_null_ptr_deref
containertests: fix null pointer defereference
2020-06-14 09:28:39 +02:00
Gaurav Singh
3815ebccdb containertests: fix null pointer defereference
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-13 19:15:50 -04:00
Gaurav Singh
9d05339487 nl: fix memory leak
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-13 14:06:04 -04:00
Stéphane Graber
ebe4f04eb6
Merge pull request #3446 from brauner/2020-06-10/fixes_2
conf: kill old chown_mapped_root()
2020-06-11 13:54:05 -04:00
Christian Brauner
472a2ff953
lxccontainer: remove pointless string duplication
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
6e1a327aba
conf: kill old chown_mapped_root()
It's now a wrapper around userns_exec_mapped_root() which allows us to avoid
fork() + exec() lxc-usernsexec makes things way nicer to test with ASAN etc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
2e8013f9f1
conf: add some more logging to userns_exec_mapped_root()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:24:21 +02:00
Christian Brauner
8053a085e0
conf: always use target_fd in userns_exec_mapped_root()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 18:19:31 +02:00
Christian Brauner
a72c68f789
conf: remove faulty flags
If we set O_RDWR we won't be able to open directories and if we set O_PATH we
won't be able to chown.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-11 17:34:40 +02:00
Stéphane Graber
c2fe5ecb28
Merge pull request #3444 from brauner/2020-06-10/fixes
cgroups: initialize lxc.pivot cpuset
2020-06-10 13:10:46 -04:00
Christian Brauner
77ffeed2b3
cgroups: initialize lxc.pivot cpuset
Closes: #3443.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-06-10 17:42:06 +02:00
Christian Brauner
140ea2e5f5
Merge pull request #3442 from tomponline/tp-veth-vlan-coverity
Coverity fixes for veth vlan
2020-06-09 15:43:18 +02:00
Thomas Parrott
3fe6b5cf29 network: Adds calls to free_ovs_veth_vlan_args in setup_veth_ovs_bridge_vlan
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 14:05:16 +01:00
Thomas Parrott
72e8122b44 network: Fix int type in log message
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 14:05:16 +01:00
Thomas Parrott
d2f8b2720b network: Adds free_ovs_veth_vlan_args and allows trunks field to be freed
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2020-06-09 14:05:16 +01:00
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