diff --git a/output.cc b/output.cc index 55f787580..ef77c7f8d 100644 --- a/output.cc +++ b/output.cc @@ -252,10 +252,16 @@ static void print_xml_service(const struct serviceDeductions *sd) { /* Show a fatal error explaining that an interface is not Ethernet and won't work on Windows. Do nothing if --send-ip (PACKET_SEND_IP_STRONG) was used. */ void win32_fatal_raw_sockets(const char *devname) { - if ((o.sendpref & PACKET_SEND_IP_STRONG) == 0) { + if ((o.sendpref & PACKET_SEND_IP_STRONG) == 0) + return; + + if (devname != NULL) { fatal("Only ethernet devices can be used for raw scans on Windows, and\n" "\"%s\" is not an ethernet device. Use the --unprivileged option\n" "for this scan.", devname); + } else { + fatal("Only ethernet devices can be used for raw scans on Windows. Use\n" + "the --unprivileged option for this scan.", devname); } }