mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
ensure IPV6 OS engine has a device name to use
This commit is contained in:
@@ -2502,6 +2502,7 @@ int FPPacket::setEthernet(const Target *target) {
|
||||
}
|
||||
else if (netutil_eth_can_send(ethsd)) {
|
||||
this->link_eth = true;
|
||||
Strncpy(this->eth_hdr.devname, devname, sizeof(this->eth_hdr.devname));
|
||||
if (netutil_eth_datalink(ethsd) == DLT_EN10MB){
|
||||
const u8 *src_mac = target->SrcMACAddress();
|
||||
const u8 *dst_mac = target->NextHopMACAddress();
|
||||
@@ -2511,7 +2512,6 @@ int FPPacket::setEthernet(const Target *target) {
|
||||
else {
|
||||
memcpy(this->eth_hdr.srcmac, src_mac, 6);
|
||||
memcpy(this->eth_hdr.dstmac, dst_mac, 6);
|
||||
Strncpy(this->eth_hdr.devname, devname, sizeof(this->eth_hdr.devname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user