fix -net user checks by reordering checks
PATCH 1/1 fix -net user checks by reordering checks
reorder slirp config options. first check the dns-server-address, then check the first-dhcp-address. the original code was comparing the first-dhcp-address with the default dns-server-address, not the configured dns-server-address.
--- net/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
net/slirp.c +6 -6
@@ -212,19 +212,19 @@ static int net_slirp_init(NetClientState *peer, const char *model,return -1 ; } -if (vdhcp_start && !inet_aton (vdhcp_start, &dhcp)) { +if (vnameserver && !inet_aton (vnameserver, &dns)) {return -1 ; } -if ((dhcp.s_addr & mask.s_addr) != net.s_addr || - dhcp.s_addr == host.s_addr || dhcp.s_addr == dns.s_addr) { +if ((dns.s_addr & mask.s_addr) != net.s_addr || + dns.s_addr == host.s_addr) {return -1 ; } -if (vnameserver && !inet_aton (vnameserver, &dns)) { +if (vdhcp_start && !inet_aton (vdhcp_start, &dhcp)) {return -1 ; } -if ((dns.s_addr & mask.s_addr) != net.s_addr || - dns.s_addr == host.s_addr) { +if ((dhcp.s_addr & mask.s_addr) != net.s_addr || + dhcp.s_addr == host.s_addr || dhcp.s_addr == dns.s_addr) {return -1 ; }
Signature · 1 line
1.7.10.4
Quoted 9 lines · Bas van Sisseren
reorder slirp config options. first check the dns-server-address, then check the first-dhcp-address. the original code was comparing the first-dhcp-address with the default dns-server-address, not the configured dns-server-address.
Signed-off-by Bas van Sisseren <[email protected]>--- net/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 6 lines · Stefan Hajnoczi
Quoted 5 lines · Bas van Sisseren
reorder slirp config options. first check the dns-server-address, then check the first-dhcp-address. the original code was comparing the first-dhcp-address with the default dns-server-address, not the configured dns-server-address.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Bas van Sisseren <[email protected]>--- net/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Reviewed-by Stefan Hajnoczi <[email protected]>
Hello qemu-devel list,
The last reaction was 2 weeks ago. Do I need more reviews for inclusion of the patch?
Regards,
Bas van Sisseren
Signature · 2 lines
Bas van Sisseren <[email protected]> Quarantainenet
Quoted 12 lines · Bas van Sisseren
Quoted 11 lines · Stefan Hajnoczi
Quoted 9 lines · Bas van Sisseren
reorder slirp config options. first check the dns-server-address, then check the first-dhcp-address. the original code was comparing the first-dhcp-address with the default dns-server-address, not the configured dns-server-address.
Signed-off-by Bas van Sisseren <[email protected]>--- net/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 6 lines
Quoted 1 line
Reviewed-by Stefan Hajnoczi <[email protected]>Hello qemu-devel list,
The last reaction was 2 weeks ago. Do I need more reviews for inclusion of the patch?
Jan is/was probably just away because of LinuxCon Japan
(http://events.linuxfoundation.org/events/linuxcon-japan). I'm sure he'll be back soon and your patch will make it in time for the QEMU 1.6 release.
Stefan
Quoted 12 lines · Bas van Sisseren
Quoted 11 lines · Stefan Hajnoczi
Quoted 9 lines · Bas van Sisseren
reorder slirp config options. first check the dns-server-address, then check the first-dhcp-address. the original code was comparing the first-dhcp-address with the default dns-server-address, not the configured dns-server-address.
Signed-off-by Bas van Sisseren <[email protected]>--- net/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 7 lines
Quoted 1 line
Reviewed-by Stefan Hajnoczi <[email protected]>Hello qemu-devel list,
The last reaction was 2 weeks ago. Do I need more reviews for inclusion of the patch?
Nope, thanks, just applied to my slirp queue.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux