Re: [B.A.T.M.A.N.] [PATCHv3 maint] batctl: tcpdump - fix IP header parsing

Marek Lindner
2014-04-06T13:56:03Z

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

On Wednesday 02 April 2014 08:27:35 Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> Fix the IP header parsing by properly converting the source
> and the destination addresses to strings.
> The problem is given by the fact that inet_ntoa() uses a
> static buffer to store its result, therefore it cannot be
> invoked twice in a row without saving the first outcome.
> Moreover inet_ntoa() is deprecated in favor of inet_pton().
>
> Introduced by 35b37756f4a3a230bf7941034d9da178ee5b4948
> ("add IPv6 support to tcpdump parser")
>
> This patch also slightly beautifies the code.
>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
> ---
>
> Change since v2:
> - fix commit subject
>
> Change since v1:
> - print all errors on stderr
>
>
> tcpdump.c | 73
> ++++++++++++++++++++++++++++++++++++--------------------------- 1 file
> changed, 42 insertions(+), 31 deletions(-)

Applied in revision f08a28d.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]