Re: [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Generalize DAT in order to support any type of data, not only IPv4

2013-09-10 Thread Antonio Quartulli
On Tue, Sep 10, 2013 at 07:35:34AM +0300, Mihail Costea wrote: On 9 September 2013 17:53, Antonio Quartulli anto...@meshcoding.com wrote: On Mon, Sep 09, 2013 at 05:05:47PM +0300, Mihail Costea wrote: Hi Antonio, Is it possible to send the new model for the generalization as a patch

Re: [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Generalize DAT in order to support any type of data, not only IPv4

2013-09-10 Thread Antonio Quartulli
On Tue, Sep 10, 2013 at 03:45:44PM +0300, Mihail Costea wrote: On 10 September 2013 08:38, Antonio Quartulli anto...@meshcoding.com wrote: On Tue, Sep 10, 2013 at 07:35:34AM +0300, Mihail Costea wrote: On 9 September 2013 17:53, Antonio Quartulli anto...@meshcoding.com wrote: On Mon,

[B.A.T.M.A.N.] [PATCH 08/11] batctl: Fix error handling jump in interface when batadv not loaded

2013-09-10 Thread Sven Eckelmann
The jump to the path_buffer free must be taken when batman-adv was not loaded because it has to free path_buff which was allocated earlier Signed-off-by: Sven Eckelmann s...@narfation.org --- sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys.c b/sys.c index

[B.A.T.M.A.N.] [PATCH 01/11] batctl: Fix possible buffer overflow when using strncat

2013-09-10 Thread Sven Eckelmann
The length field (n) of strncat is used to specify the length of the buffer without the \0 delimiter. strncat will add it even when it will write it to the limit of n bytes was written. Signed-off-by: Sven Eckelmann s...@narfation.org --- bat-hosts.c | 2 +- functions.c | 4 ++-- 2 files

[B.A.T.M.A.N.] [PATCH 06/11] batctl: Remove legacy types u64 and caddr_t

2013-09-10 Thread Sven Eckelmann
The definition of u64 was not obtained from the correct source to always use 64 bit. Instead uint64_t can be used. Also caddr_t is obsolete BSDism and void* should be used instead. Signed-off-by: Sven Eckelmann s...@narfation.org --- ioctl.c | 11 +-- 1 file changed, 5 insertions(+), 6

[B.A.T.M.A.N.] [PATCH 04/11] batctl: Mark all local functions as static

2013-09-10 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- debug.c | 2 +- main.c | 2 +- ping.c | 4 ++-- traceroute.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debug.c b/debug.c index 3ea112a..2589dbc 100644 --- a/debug.c +++ b/debug.c @@ -84,7 +84,7 @@

[B.A.T.M.A.N.] [PATCH 03/11] batctl: Avoid assigning const buffer to non-const pointer

2013-09-10 Thread Sven Eckelmann
Strings in C are tried to be saved in the .rodata by the compiler/linker. This section is readonly as the name suggests. Pointer to these strings should therefore be const. Signed-off-by: Sven Eckelmann s...@narfation.org --- functions.c | 8 +--- functions.h | 5 +++-- 2 files changed, 8

[B.A.T.M.A.N.] [PATCH 02/11] batctl: Fix inconsistent use of _GNU_SOURCE

2013-09-10 Thread Sven Eckelmann
Either all or no source file should define _GNU_SOURCE to avoid incompatible types or function declarations. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile| 1 + bat-hosts.c | 1 - functions.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile

[B.A.T.M.A.N.] [PATCH 09/11] batctl: Fix type of new neighbor buffer in _seqno_trace_neigh_add

2013-09-10 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- bisect_iv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bisect_iv.c b/bisect_iv.c index eadf427..917ffec 100644 --- a/bisect_iv.c +++ b/bisect_iv.c @@ -1041,7 +1041,7 @@ static void seqno_trace_print(struct

[B.A.T.M.A.N.] [PATCH 07/11] batctl: Add missing includes and remove unused includes

2013-09-10 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- bat-hosts.c | 5 +++-- bat-hosts.h | 2 +- bisect_iv.c | 7 --- debug.c | 5 - debug.h | 3 +++ debugfs.c | 10 -- debugfs.h | 3 --- functions.c | 2 ++ functions.h | 3 ++- ioctl.c |

[B.A.T.M.A.N.] [PATCH 05/11] batctl: Add include guards to avoid redundant declarations or include loops

2013-09-10 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- allocate.h | 4 ++-- bat-hosts.h | 4 ++-- bisect_iv.h | 5 + debug.h | 4 functions.h | 5 - ioctl.h | 4 main.h | 5 + ping.h | 5 - sys.h| 4 tcpdump.h| 4

[B.A.T.M.A.N.] [PATCH 11/11] batctl: Don't use hyphen for parameter in manpage

2013-09-10 Thread Sven Eckelmann
By default, - chars are interpreted as hyphens (U+2010) by groff, not as minus signs (U+002D). Since options to programs use minus signs (U+002D), this means for example in UTF-8 locales that you cannot cut and paste options, nor search for them easily. Signed-off-by: Sven Eckelmann

Re: [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Generalize DAT in order to support any type of data, not only IPv4

2013-09-10 Thread Mihail Costea
On 11 September 2013 00:01, Antonio Quartulli anto...@meshcoding.com wrote: On Tue, Sep 10, 2013 at 03:45:44PM +0300, Mihail Costea wrote: On 10 September 2013 08:38, Antonio Quartulli anto...@meshcoding.com wrote: On Tue, Sep 10, 2013 at 07:35:34AM +0300, Mihail Costea wrote: On 9 September