diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-01-18 19:32:27 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-01-18 21:02:24 +0100 |
| commit | 543c012b4ec683a624e7cffc927ad246e238cc27 (patch) | |
| tree | 981076f2af7fad3a3759c3cb5be17842077c15c7 /executor | |
| parent | 2fd6bd0d1b46dd17621c1c4a7ae167341e07620e (diff) | |
executor: create macvtap, macsec devices
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 21 | ||||
| -rw-r--r-- | executor/defs.h | 12 |
2 files changed, 21 insertions, 12 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 39d2374d9..354a9e84e 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -273,15 +273,15 @@ static void netlink_add_hsr(struct nlmsg* nlmsg, int sock, const char* name, (void)err; } -static void netlink_add_virt_wifi(struct nlmsg* nlmsg, int sock, const char* name, const char* link) +static void netlink_add_linked(struct nlmsg* nlmsg, int sock, const char* type, const char* name, const char* link) { - netlink_add_device_impl(nlmsg, "virt_wifi", name); + netlink_add_device_impl(nlmsg, type, name); netlink_done(nlmsg); int ifindex = if_nametoindex(link); netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); int err = netlink_send(nlmsg, sock); - debug("netlink: adding device %s type virt_wifi link %s: %s\n", - name, link, strerror(err)); + debug("netlink: adding device %s type %s link %s: %s\n", + name, type, link, strerror(err)); (void)err; } @@ -780,7 +780,8 @@ static void initialize_netdevices(void) {"xfrm", "xfrm0"}, }; const char* devmasters[] = {"bridge", "bond", "team"}; - // If you extend this array, also update netdev_addr_id in vnet.txt. + // If you extend this array, also update netdev_addr_id in vnet.txt + // and devnames in socket.txt. struct { const char* name; int macsize; @@ -831,6 +832,10 @@ static void initialize_netdevices(void) {"macvlan1", ETH_ALEN}, {"ipvlan0", ETH_ALEN}, {"ipvlan1", ETH_ALEN}, + {"veth0_macvtap", ETH_ALEN}, + {"veth1_macvtap", ETH_ALEN}, + {"macvtap0", ETH_ALEN}, + {"macsec0", ETH_ALEN}, }; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) @@ -867,7 +872,7 @@ static void initialize_netdevices(void) netlink_device_change(&nlmsg, sock, "hsr_slave_1", true, 0, 0, 0, NULL); netlink_add_veth(&nlmsg, sock, "veth0_virt_wifi", "veth1_virt_wifi"); - netlink_add_virt_wifi(&nlmsg, sock, "virt_wifi0", "veth1_virt_wifi"); + netlink_add_linked(&nlmsg, sock, "virt_wifi", "virt_wifi0", "veth1_virt_wifi"); netlink_add_veth(&nlmsg, sock, "veth0_vlan", "veth1_vlan"); netlink_add_vlan(&nlmsg, sock, "vlan0", "veth0_vlan", 0, htons(ETH_P_8021Q)); @@ -877,6 +882,10 @@ static void initialize_netdevices(void) netlink_add_ipvlan(&nlmsg, sock, "ipvlan0", "veth0_vlan", IPVLAN_MODE_L2, 0); netlink_add_ipvlan(&nlmsg, sock, "ipvlan1", "veth0_vlan", IPVLAN_MODE_L3S, IPVLAN_F_VEPA); + netlink_add_veth(&nlmsg, sock, "veth0_macvtap", "veth1_macvtap"); + netlink_add_linked(&nlmsg, sock, "macvtap", "macvtap0", "veth0_macvtap"); + netlink_add_linked(&nlmsg, sock, "macsec", "macsec0", "veth1_macvtap"); + netdevsim_add((int)procid, 4); // Number of port is in sync with value in sys/linux/socket_netlink_generic_devlink.txt for (i = 0; i < sizeof(devices) / (sizeof(devices[0])); i++) { diff --git a/executor/defs.h b/executor/defs.h index 97f711c56..cf40f8baa 100644 --- a/executor/defs.h +++ b/executor/defs.h @@ -70,7 +70,7 @@ #if GOARCH_386 #define GOARCH "386" -#define SYZ_REVISION "d0b8975fbb0ff652664b95d27a42507cf96f8b13" +#define SYZ_REVISION "0b950fdf9a7a5b3bbce32d090e9b8b099a81121c" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -80,7 +80,7 @@ #if GOARCH_amd64 #define GOARCH "amd64" -#define SYZ_REVISION "19a375005881200ea7807bf0b164d3e05b572ba6" +#define SYZ_REVISION "a9337daf7167006dd9268bbdbfc8f2653f866c13" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -90,7 +90,7 @@ #if GOARCH_arm #define GOARCH "arm" -#define SYZ_REVISION "88e501cc5d571808a00274920765a6d6eaea0a2b" +#define SYZ_REVISION "410d0b28df0c99c0128e7148f29e4edaf3af44a4" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -100,7 +100,7 @@ #if GOARCH_arm64 #define GOARCH "arm64" -#define SYZ_REVISION "f98747c403e8a15ea939209b84c0c67706150d8f" +#define SYZ_REVISION "bebfb9ca20798524be543e9bc29d0a4a7381ebe8" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -110,7 +110,7 @@ #if GOARCH_mips64le #define GOARCH "mips64le" -#define SYZ_REVISION "0a752f05e4385d373407db139561dab4a001d8d8" +#define SYZ_REVISION "b0f422271296f66b635d18727990994397af7f2e" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -120,7 +120,7 @@ #if GOARCH_ppc64le #define GOARCH "ppc64le" -#define SYZ_REVISION "d4bca491d3ff4f0fa88f90fae5b0465cf648195b" +#define SYZ_REVISION "d5cc7193bc23aa0ce1147c72fc49c6c35cb13fa5" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 |
