qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks
@ 2013-06-03 13:11 Bas van Sisseren
  2013-06-04 12:26 ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Bas van Sisseren @ 2013-06-03 13:11 UTC (permalink / raw)
  To: Qemu-devel; +Cc: 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 <bas@quarantainenet.nl>
---
 net/slirp.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/slirp.c b/net/slirp.c
index b3f35d5..124e953 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -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;
     }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks
  2013-06-03 13:11 [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks Bas van Sisseren
@ 2013-06-04 12:26 ` Stefan Hajnoczi
  2013-06-17 11:41   ` Bas van Sisseren
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-06-04 12:26 UTC (permalink / raw)
  To: Bas van Sisseren; +Cc: Jan Kiszka, Qemu-devel

On Mon, Jun 03, 2013 at 03:11:49PM +0200, Bas van Sisseren wrote:
> 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 <bas@quarantainenet.nl>
> ---
>  net/slirp.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks
  2013-06-04 12:26 ` Stefan Hajnoczi
@ 2013-06-17 11:41   ` Bas van Sisseren
  2013-06-17 12:39     ` Stefan Hajnoczi
  2013-06-18 13:31     ` Jan Kiszka
  0 siblings, 2 replies; 5+ messages in thread
From: Bas van Sisseren @ 2013-06-17 11:41 UTC (permalink / raw)
  To: Qemu-devel; +Cc: Stefan Hajnoczi, Jan Kiszka

On 04/06/13 14:26, Stefan Hajnoczi wrote:
> On Mon, Jun 03, 2013 at 03:11:49PM +0200, Bas van Sisseren wrote:
>> 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 <bas@quarantainenet.nl>
>> ---
>>  net/slirp.c |   12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

-- 
Bas van Sisseren <bas@quarantainenet.nl>
Quarantainenet

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks
  2013-06-17 11:41   ` Bas van Sisseren
@ 2013-06-17 12:39     ` Stefan Hajnoczi
  2013-06-18 13:31     ` Jan Kiszka
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-06-17 12:39 UTC (permalink / raw)
  To: Bas van Sisseren; +Cc: Jan Kiszka, Qemu-devel

On Mon, Jun 17, 2013 at 01:41:40PM +0200, Bas van Sisseren wrote:
> On 04/06/13 14:26, Stefan Hajnoczi wrote:
> > On Mon, Jun 03, 2013 at 03:11:49PM +0200, Bas van Sisseren wrote:
> >> 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 <bas@quarantainenet.nl>
> >> ---
> >>  net/slirp.c |   12 ++++++------
> >>  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks
  2013-06-17 11:41   ` Bas van Sisseren
  2013-06-17 12:39     ` Stefan Hajnoczi
@ 2013-06-18 13:31     ` Jan Kiszka
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2013-06-18 13:31 UTC (permalink / raw)
  To: Bas van Sisseren; +Cc: Stefan Hajnoczi, Qemu-devel

On 2013-06-17 13:41, Bas van Sisseren wrote:
> On 04/06/13 14:26, Stefan Hajnoczi wrote:
>> On Mon, Jun 03, 2013 at 03:11:49PM +0200, Bas van Sisseren wrote:
>>> 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 <bas@quarantainenet.nl>
>>> ---
>>>  net/slirp.c |   12 ++++++------
>>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> 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

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-18 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 13:11 [Qemu-devel] [PATCH] [slirp] fix -net user checks by reordering checks Bas van Sisseren
2013-06-04 12:26 ` Stefan Hajnoczi
2013-06-17 11:41   ` Bas van Sisseren
2013-06-17 12:39     ` Stefan Hajnoczi
2013-06-18 13:31     ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).