Re: [Qemu-devel] [PATCH] linux-user: convert sockaddr_ll from host to target

2016-06-29 Thread Laurent Vivier
Le 27/06/2016 à 00:18, Laurent Vivier a écrit : > As we convert sockaddr for AF_PACKET family for sendto() (target to > host) we need also to convert this for getsockname() (host to target). > > arping uses getsockname() to get the the interface address and uses > this address with sendto(). > >

Re: [Qemu-devel] [PATCH] linux-user: convert sockaddr_ll from host to target

2016-06-27 Thread Peter Maydell
On 27 June 2016 at 14:12, Laurent Vivier wrote: > > > Le 27/06/2016 à 15:09, Peter Maydell a écrit : >> Do we need the new include? We already use struct sockaddr_ll >> without it. > > we already use target_sockaddr_ll, not sockaddr_ll. Oh yes; I got confused with sockaddr_nl I think. thanks --

Re: [Qemu-devel] [PATCH] linux-user: convert sockaddr_ll from host to target

2016-06-27 Thread Laurent Vivier
Le 27/06/2016 à 15:09, Peter Maydell a écrit : > On 26 June 2016 at 23:18, Laurent Vivier wrote: >> As we convert sockaddr for AF_PACKET family for sendto() (target to >> host) we need also to convert this for getsockname() (host to target). >> >> arping uses getsockname() to get the the interfa

Re: [Qemu-devel] [PATCH] linux-user: convert sockaddr_ll from host to target

2016-06-27 Thread Peter Maydell
On 26 June 2016 at 23:18, Laurent Vivier wrote: > As we convert sockaddr for AF_PACKET family for sendto() (target to > host) we need also to convert this for getsockname() (host to target). > > arping uses getsockname() to get the the interface address and uses > this address with sendto(). > > T

[Qemu-devel] [PATCH] linux-user: convert sockaddr_ll from host to target

2016-06-26 Thread Laurent Vivier
As we convert sockaddr for AF_PACKET family for sendto() (target to host) we need also to convert this for getsockname() (host to target). arping uses getsockname() to get the the interface address and uses this address with sendto(). Tested with: /sbin/arping -D -q -c2 -I eno1 192.168.122.8