diff --git a/gtests/net/packetdrill/config.c b/gtests/net/packetdrill/config.c index cc61bdeada04eb99658225b23b0d94baa9e5f299..6b335f0c105665b28bd6c280e88e70e451f6d15a 100644 --- a/gtests/net/packetdrill/config.c +++ b/gtests/net/packetdrill/config.c @@ -220,8 +220,10 @@ void set_default_config(struct config *config) config->init_scripts = NULL; config->wire_server_port = 8081; +#ifdef linux config->wire_client_device = "eth0"; config->wire_server_device = "eth0"; +#endif } static void set_remote_ip_and_prefix(struct config *config) @@ -320,6 +322,19 @@ void finalize_config(struct config *config) break; /* omitting default so compiler will catch missing cases */ } + if (config->is_wire_client) { + if (config->wire_client_device == NULL) { + die("wire_client_dev not specified\n"); + } + if (config->wire_server_ip_string == NULL) { + die("wire_server_ip not specified\n"); + } + } + if (config->is_wire_server) { + if (config->wire_server_device == NULL) { + die("%s: wire_server_dev not specified\n"); + } + } } /* Expect that arg is comma-delimited, allowing for spaces. */