* [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol
@ 2019-03-02 2:25 Samuel Thibault
2019-03-02 17:31 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ 2019-03-02 2:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Samuel Thibault, stefanha, jan.kiszka, will
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
slirp/tcp_subr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index ef9d99c154..1d7e72dca7 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -660,10 +660,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
tmpso->so_fport == n1) {
if (getsockname(tmpso->s,
(struct sockaddr *)&addr, &addrlen) == 0)
- n2 = ntohs(addr.sin_port);
+ n2 = addr.sin_port;
break;
}
}
+ NTOHS(n1);
+ NTOHS(n2);
so_rcv->sb_cc = snprintf(so_rcv->sb_data,
so_rcv->sb_datalen,
"%d,%d\r\n", n1, n2);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol
2019-03-02 2:25 [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol Samuel Thibault
@ 2019-03-02 17:31 ` Philippe Mathieu-Daudé
2019-03-02 17:36 ` Samuel Thibault
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-02 17:31 UTC (permalink / raw)
To: Samuel Thibault, qemu-devel; +Cc: will, stefanha, jan.kiszka
Hi Samuel,
On 3/2/19 3:25 AM, Samuel Thibault wrote:
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
I got:
Applying: slirp: fix big/little endian conversion in ident protocol
error: patch failed: slirp/tcp_subr.c:660
error: slirp/tcp_subr.c: patch does not apply
Then noticed another slirp patch, applied first then this one succeed,
so you missed:
Based-on: <1551476756-25749-1-git-send-email-will@wbowling.info>
> slirp/tcp_subr.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
> index ef9d99c154..1d7e72dca7 100644
> --- a/slirp/tcp_subr.c
> +++ b/slirp/tcp_subr.c
> @@ -660,10 +660,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
> tmpso->so_fport == n1) {
> if (getsockname(tmpso->s,
> (struct sockaddr *)&addr, &addrlen) == 0)
> - n2 = ntohs(addr.sin_port);
> + n2 = addr.sin_port;
> break;
> }
> }
> + NTOHS(n1);
> + NTOHS(n2);
> so_rcv->sb_cc = snprintf(so_rcv->sb_data,
> so_rcv->sb_datalen,
> "%d,%d\r\n", n1, n2);
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol
2019-03-02 17:31 ` Philippe Mathieu-Daudé
@ 2019-03-02 17:36 ` Samuel Thibault
2019-03-02 17:49 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ 2019-03-02 17:36 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-devel, will, stefanha, jan.kiszka
Philippe Mathieu-Daudé, le sam. 02 mars 2019 18:31:56 +0100, a ecrit:
> On 3/2/19 3:25 AM, Samuel Thibault wrote:
> > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> > ---
>
> I got:
>
> Applying: slirp: fix big/little endian conversion in ident protocol
> error: patch failed: slirp/tcp_subr.c:660
> error: slirp/tcp_subr.c: patch does not apply
>
> Then noticed another slirp patch, applied first then this one succeed,
> so you missed:
>
> Based-on: <1551476756-25749-1-git-send-email-will@wbowling.info>
Oh, I didn't know about that one.
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Thanks!
Samuel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol
2019-03-02 17:36 ` Samuel Thibault
@ 2019-03-02 17:49 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-02 17:49 UTC (permalink / raw)
To: Samuel Thibault; +Cc: qemu-devel, will, stefanha, jan.kiszka
On 3/2/19 6:36 PM, Samuel Thibault wrote:
> Philippe Mathieu-Daudé, le sam. 02 mars 2019 18:31:56 +0100, a ecrit:
>> On 3/2/19 3:25 AM, Samuel Thibault wrote:
>>> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>>> ---
>>
>> I got:
>>
>> Applying: slirp: fix big/little endian conversion in ident protocol
>> error: patch failed: slirp/tcp_subr.c:660
>> error: slirp/tcp_subr.c: patch does not apply
>>
>> Then noticed another slirp patch, applied first then this one succeed,
>> so you missed:
>>
>> Based-on: <1551476756-25749-1-git-send-email-will@wbowling.info>
>
> Oh, I didn't know about that one.
BTW 'Based-on' is a hint for the reviewers and automatic testing bots,
telling "this commit is <based on> this other <series|patch>", and
without applying the base it is unlikely this patch|series applies.
It is not meant the git history, so for single commit we add it under
the first '---' separator (automatically stripped out when applied) or
for series we add it to the cover.
I guess there are no doc about that hint in HACKING neither in the wiki,
I remember the post where it was introduced:
https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg01288.html
Regards,
Phil.
>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Thanks!
>
> Samuel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-02 18:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02 2:25 [Qemu-devel] [PATCH] slirp: fix big/little endian conversion in ident protocol Samuel Thibault
2019-03-02 17:31 ` Philippe Mathieu-Daudé
2019-03-02 17:36 ` Samuel Thibault
2019-03-02 17:49 ` Philippe Mathieu-Daudé
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).