diff --git a/bochs/CHANGES b/bochs/CHANGES index f8183cddf..41859878f 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -26,7 +26,7 @@ Detailed change log : - Added PCM playback/recording support using PulseAudio simple API - Networking - Added support for using libslirp library instead of builtin slirp code - - Updated builtin slirp from libslirp 4.8.0 (including IPv6 support) + - Updated builtin slirp based on libslirp 4.8.0 (including IPv6 support) - BIOS - Added panic in legacy BIOS in case no VGA BIOS ROM is found at C000:0000, diff --git a/bochs/iodev/network/eth_slirp.cc b/bochs/iodev/network/eth_slirp.cc index 5bfe5a227..c804d0272 100644 --- a/bochs/iodev/network/eth_slirp.cc +++ b/bochs/iodev/network/eth_slirp.cc @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// eth_slirp.cc - Bochs port of Qemu's slirp implementation (plus libslirp support) +// eth_slirp.cc - Bochs port of Qemu's slirp implementation (updated from libslirp 4.8.0) // Portion of this software comes with the following license: BSD-3-Clause #define BX_PLUGGABLE @@ -283,6 +283,9 @@ bx_slirp_pktmover_c::bx_slirp_pktmover_c(const char *netif, config.vnameserver.s_addr = htonl(0x0a000203); /* 10.0.2.3 */ config.tftp_path = netif; config.vdomainname = "local"; + /* enable IPv6 support by default using QEMU settings */ + config.in6_enabled = true; + inet_pton(AF_INET6, "fec0::", &config.vprefix_addr6); #ifndef WIN32 smb_export = NULL; smb_tmpdir = NULL; @@ -317,7 +320,6 @@ bx_slirp_pktmover_c::bx_slirp_pktmover_c(const char *netif, } if (config.in6_enabled) { BX_INFO(("IPv6 enabled (using default QEMU settings)")); - inet_pton(AF_INET6, "fec0::", &config.vprefix_addr6); config.vprefix_len = 64; config.vhost6 = config.vprefix_addr6; config.vhost6.s6_addr[15] |= 2; @@ -565,6 +567,8 @@ bool bx_slirp_pktmover_c::parse_slirp_conf(const char *conf) } } else if (!stricmp(param, "ipv6_enabled")) { config.in6_enabled = (atoi(val) != 0); + } else if (!stricmp(param, "ipv6_prefix")) { + inet_pton(AF_INET6, val, &config.vprefix_addr6); } else if (!stricmp(param, "tftp_srvname")) { if (len2 < 33) { config.tftp_server_name = (char*)malloc(len2+1); diff --git a/bochs/misc/slirp.conf b/bochs/misc/slirp.conf index c30d56c0e..3531f3772 100644 --- a/bochs/misc/slirp.conf +++ b/bochs/misc/slirp.conf @@ -42,8 +42,9 @@ # Packet logging example # pktlog = slirp-pktlog.txt -# Enable IPv6 support (using default Qemu setup) +# IPv6 support (enabled by default using Qemu settings) # ipv6_enabled = 1 +# ipv6_prefix = fec0:: # Enable slirp debugging support if > 0 # The value can be a combination of these debug levels