diff options
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index d49e99364..608dc964c 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -112,7 +112,6 @@ static bool write_file(const char* file, const char* what, ...) #include <sys/socket.h> #include <sys/types.h> -#include <linux/if.h> #include <linux/if_addr.h> #include <linux/if_link.h> #include <linux/in6.h> @@ -313,13 +312,13 @@ static void netlink_add_neigh(int sock, const char* name, #include <arpa/inet.h> #include <errno.h> #include <fcntl.h> +#include <net/if.h> #include <net/if_arp.h> #include <stdarg.h> #include <stdbool.h> #include <sys/ioctl.h> #include <sys/stat.h> -#include <linux/if.h> #include <linux/if_ether.h> #include <linux/if_tun.h> #include <linux/ip.h> @@ -425,11 +424,7 @@ static void initialize_tun(void) #include <arpa/inet.h> #include <errno.h> #include <fcntl.h> -#include <linux/if.h> -#include <linux/if_ether.h> -#include <linux/if_tun.h> -#include <linux/ip.h> -#include <linux/tcp.h> +#include <net/if.h> #include <net/if_arp.h> #include <stdarg.h> #include <stdbool.h> @@ -437,6 +432,11 @@ static void initialize_tun(void) #include <sys/stat.h> #include <sys/uio.h> +#include <linux/if_ether.h> +#include <linux/if_tun.h> +#include <linux/ip.h> +#include <linux/tcp.h> + // Addresses are chosen to be in the same subnet as tun addresses. #define DEV_IPV4 "172.20.20.%d" #define DEV_IPV6 "fe80::%02hx" @@ -1208,12 +1208,13 @@ static long syz_kvm_setup_cpu(long a0, long a1, long a2, long a3, long a4, long #if SYZ_EXECUTOR || SYZ_RESET_NET_NAMESPACE #include <errno.h> -#include <linux/if.h> -#include <linux/net.h> +#include <net/if.h> #include <netinet/in.h> #include <string.h> #include <sys/socket.h> +#include <linux/net.h> + // checkpoint/reset_net_namespace partially resets net namespace to initial state // after each test. Currently it resets only ipv4 netfilter state. // Ideally, we just create a new net namespace for each test, |
