Commit 8389e7f4e1412cee0d8f8c21a1386259338a6299

Authored by Anthony Liguori
1 parent ef2039f1

slirp: Fix default netmask to 255.255.255.0

This got broken between a13a4126 and c92ef6a2: old slirp code used
255.255.255.0.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 2 additions and 2 deletions
@@ -782,8 +782,8 @@ static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model, @@ -782,8 +782,8 @@ static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model,
782 const char *vsmbserver) 782 const char *vsmbserver)
783 { 783 {
784 /* default settings according to historic slirp */ 784 /* default settings according to historic slirp */
785 - struct in_addr net = { .s_addr = htonl(0x0a000000) }; /* 10.0.0.0 */  
786 - struct in_addr mask = { .s_addr = htonl(0xff000000) }; /* 255.0.0.0 */ 785 + struct in_addr net = { .s_addr = htonl(0x0a000200) }; /* 10.0.2.0 */
  786 + struct in_addr mask = { .s_addr = htonl(0xffffff00) }; /* 255.255.255.0 */
787 struct in_addr host = { .s_addr = htonl(0x0a000202) }; /* 10.0.2.2 */ 787 struct in_addr host = { .s_addr = htonl(0x0a000202) }; /* 10.0.2.2 */
788 struct in_addr dhcp = { .s_addr = htonl(0x0a00020f) }; /* 10.0.2.15 */ 788 struct in_addr dhcp = { .s_addr = htonl(0x0a00020f) }; /* 10.0.2.15 */
789 struct in_addr dns = { .s_addr = htonl(0x0a000203) }; /* 10.0.2.3 */ 789 struct in_addr dns = { .s_addr = htonl(0x0a000203) }; /* 10.0.2.3 */