diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-01-03 09:58:48 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-01-03 16:11:49 +0100 |
| commit | fca6a74d0c61dd34f252deb900c52027d9fc373f (patch) | |
| tree | 5946a904ef6405648f0c4d4b83f3b8f7ce3dd8db /executor/common_linux.h | |
| parent | 5e3bc74104143da1d2584bf2bf312ae277caf756 (diff) | |
executor: connect virt_wifi to veth
virt_wifi docs say that the enslaved device won't be usable
on itself. It's probably not a good idea to make lo unusable.
Enslave a dedicated veth instead.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index aa9eca32a..21560886b 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -769,6 +769,8 @@ static void initialize_netdevices(void) {"batadv0", ETH_ALEN}, {netdevsim, ETH_ALEN}, {"xfrm0", ETH_ALEN}, + {"veth0_virt_wifi", ETH_ALEN}, + {"veth1_virt_wifi", ETH_ALEN}, {"virt_wifi0", ETH_ALEN}, }; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); @@ -804,7 +806,9 @@ static void initialize_netdevices(void) netlink_add_hsr(&nlmsg, sock, "hsr0", "hsr_slave_0", "hsr_slave_1"); netlink_device_change(&nlmsg, sock, "hsr_slave_0", true, 0, 0, 0, NULL); netlink_device_change(&nlmsg, sock, "hsr_slave_1", true, 0, 0, 0, NULL); - netlink_add_virt_wifi(&nlmsg, sock, "virt_wifi0", "lo"); + + netlink_add_veth(&nlmsg, sock, "veth0_virt_wifi", "veth1_virt_wifi"); + netlink_add_virt_wifi(&nlmsg, sock, "virt_wifi0", "veth1_virt_wifi"); netdevsim_add((int)procid, 4); // Number of port is in sync with value in sys/linux/socket_netlink_generic_devlink.txt |
