﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
20128	VBoxNetDHCP crashes with fixed address config => Fixed in SVN	Remy Zandwijk		"VBoxNetDHCP crashes with an segmentation fault 11 when a MAC address is assigned an fixed IP address. I observed the crash on both macOS 10.15.7 and Debian 10 running VirtualBox 6.1.16.

I created a NAT network like this:
{{{
$ VBoxManage natnetwork add   --netname SciStor --network 172.27.27.0/24 --enable --dhcp on
$ VBoxManage natnetwork start --netname SciStor
$ VBoxManage dhcpserver modify  --network SciStor --lower-ip 172.27.27.100
$ VBoxManage dhcpserver restart --network SciStor
}}}

This works as expected, the first vm which is started gets the .100 IP address. But, I want the vm to get a static IP address and therefore I did:

{{{
$ VBoxManage dhcpserver modify  --network SciStor --mac-address=""56424F580101"" --fixed-address=""172.27.27.10""
$ VBoxManage dhcpserver restart --network SciStor
}}}

After starting the vm, I noticed that the vm did not get an DHCP offer. Note: I am not sure if the fixed address should be within or without the DHCP address range, but I tried both and the result is the same: VBoxNetDHCP crashes.


The DHCP config file looks like:

{{{
<?xml version=""1.0""?>
<DHCPServer networkName=""SciStor"" trunkType=""whatever"" IPAddress=""172.27.27.3"" lowerIP=""172.27.27.100"" upperIP=""172.27.27.254"" leasesFilename=""/Users/remy/Library/VirtualBox/SciStor-Dhcpd.leases"" networkMask=""255.255.255.0"">
  <Options>
    <Option name=""1"" encoding=""0"" value=""255.255.255.0""/>
    <Option name=""3"" encoding=""0"" value=""172.27.27.1""/>
    <Option name=""6"" encoding=""0"" value=""192.168.10.1""/>
    <Option name=""15"" encoding=""0"" value=""example.com""/>
  </Options>
  <Config MACAddress=""56:42:4f:58:01:01"" fixedAddress=""172.27.27.10""/>
</DHCPServer>
}}}

If VBoxNetDHCP is started by hand, while using this config, it crashes on both macOS and Debian:

{{{
$ /Applications/VirtualBox.app/Contents/MacOS/VBoxNetDHCP --comment SciStor --config /Users/remy/Library/VirtualBox/SciStor-Dhcpd.config --log /Users/remy/Library/VirtualBox/SciStor-Dhcpd.log
VBoxNetDHCP: info: reading config from '/Users/remy/Library/VirtualBox/SciStor-Dhcpd.config'...
Segmentation fault: 11
}}}

If I leave the <Config MACAddress ....   line out, VBoxNetDHCP runs just fine. 

"	defect	closed	network	VirtualBox 6.1.16	fixed			other	all
