[Olsr-dev] [PATCH] net_olsr.c: add 'interface' to logmessage
Ferry Huberts
(spam-protected)
Sun Feb 28 22:32:41 CET 2016
On 28/02/16 21:53, Bastian Bittorf wrote:
> makes debugging easier if one has a lot of interfaces
>
> Signed-off-by: Bastian Bittorf <(spam-protected)>
> ---
> src/net_olsr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/net_olsr.c b/src/net_olsr.c
> index 37cb970..ab4daa3 100644
> --- a/src/net_olsr.c
> +++ b/src/net_olsr.c
> @@ -384,7 +384,7 @@ net_output(struct interface_olsr *ifp)
> 0) {
> perror("sendto(v4)");
> #ifndef _WIN32
> - olsr_syslog(OLSR_LOG_ERR, "OLSR: sendto IPv4 %m");
> + olsr_syslog(OLSR_LOG_ERR, "OLSR: interface %d sendto IPv4 %m", ifp->if_index);
are you sure? the index, not the name?
the name seems a bit more readable.
> #endif /* _WIN32 */
> retval = -1;
> }
> @@ -395,7 +395,7 @@ net_output(struct interface_olsr *ifp)
> struct ipaddr_str buf;
> perror("sendto(v6)");
> #ifndef _WIN32
> - olsr_syslog(OLSR_LOG_ERR, "OLSR: sendto IPv6 %m");
> + olsr_syslog(OLSR_LOG_ERR, "OLSR: interface %d sendto IPv6 %m", ifp->if_index);
> #endif /* _WIN32 */
> fprintf(stderr, "Socket: %d interface: %d\n", ifp->olsr_socket, ifp->if_index);
> fprintf(stderr, "To: %s (size: %u)\n", ip6_to_string(&buf, &sin6->sin6_addr), (unsigned int)sizeof(*sin6));
same here
--
Ferry Huberts
More information about the Olsr-dev
mailing list