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