Ferry Huberts [Mon, 28 Mar 2016 11:07:13 +0000 (13:07 +0200)]
info: add abuf_json_prefix json helper
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 28 Mar 2016 10:02:48 +0000 (12:02 +0200)]
info: move json helpers here from jsoninfo
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 24 Mar 2016 17:21:39 +0000 (18:21 +0100)]
sgw: update a comment
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 24 Mar 2016 17:13:17 +0000 (18:13 +0100)]
Revert "sgw: fix a mask in the sgw status file"
This reverts commit
3f329381a1d4edb3988cf84daa1bf85c586d42a0.
Ferry Huberts [Thu, 24 Mar 2016 16:57:17 +0000 (17:57 +0100)]
sgw: fix a mask in the sgw status file
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 24 Mar 2016 11:52:46 +0000 (12:52 +0100)]
jsoninfo: fix a typo in /config
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 22 Mar 2016 15:33:36 +0000 (16:33 +0100)]
jsoninfo: remove a derived field from the /config output
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 21 Mar 2016 14:18:17 +0000 (15:18 +0100)]
jsoninfo: in /config rename sgw weight section to costsCalculation
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 21 Mar 2016 13:38:55 +0000 (14:38 +0100)]
jsoninfo: improve /config
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 16:34:19 +0000 (17:34 +0100)]
jsoninfo: allow key to be NULL when printing a string
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 13:26:01 +0000 (14:26 +0100)]
jsoninfo: in /interfaces show message times like validity times
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 12:58:22 +0000 (13:58 +0100)]
jsoninfo: remove an obsolete comment
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 12:57:40 +0000 (13:57 +0100)]
jsoninfo: in /interfaces use the new IP address helper function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 12:57:18 +0000 (13:57 +0100)]
jsoninfo: in /interfaces show 'state' text as 'up' boolean
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 12:55:37 +0000 (13:55 +0100)]
jsoninfo: add a function to directly convert an IP address
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 18 Mar 2016 08:22:21 +0000 (09:22 +0100)]
info: create more space for more info commands
By changing the bitmask to ULL.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 17 Mar 2016 17:59:50 +0000 (18:59 +0100)]
jsoninfo: minor simplification in /2hop
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 17 Mar 2016 17:33:35 +0000 (18:33 +0100)]
jsoninfo: print the 2-hops neighbors as a simple list of IP addresses
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 17 Mar 2016 17:31:10 +0000 (18:31 +0100)]
jsoninfo: allow key to be NULL when printing an IP address
For simple lists/sets
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 17 Mar 2016 16:29:25 +0000 (17:29 +0100)]
jsoninfo: in /plugins list plugin parameters as map entries
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 17 Mar 2016 14:04:53 +0000 (15:04 +0100)]
jsoninfo: simplify /mid output
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 15:03:33 +0000 (16:03 +0100)]
jsoninfo: in /plugins show parameters as name/value
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 13:37:06 +0000 (14:37 +0100)]
jsoninfo: in /plugins list plugin parameters as array entries
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 13:00:09 +0000 (14:00 +0100)]
jsoninfo: protect against out-of-bounds accesses of TXT array
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 12:43:29 +0000 (13:43 +0100)]
jsoninfo: protect against nulll-deref in print_interface_config
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 12:43:05 +0000 (13:43 +0100)]
jsoninfo: add some asserts
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 10:19:18 +0000 (11:19 +0100)]
info: re-introduce composite commands
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 8 Mar 2016 15:59:04 +0000 (16:59 +0100)]
info: skip multiple leading slashes on the command
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 8 Mar 2016 15:39:04 +0000 (16:39 +0100)]
info: strip trailing slashes from the command
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 9 Mar 2016 12:00:43 +0000 (13:00 +0100)]
jsoninfo: move some static functions around
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 8 Mar 2016 14:13:42 +0000 (15:13 +0100)]
jsoninfo: do not show interface /sys/class/net/data in /interfaces
Has nothing to do with olsrd and can be obtained through other means
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:43:47 +0000 (10:43 +0100)]
jsoninfo: improve /interfaces
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 8 Mar 2016 09:22:45 +0000 (10:22 +0100)]
jsoninfo: add print_interface_config function and use it
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 13:23:05 +0000 (14:23 +0100)]
jsoninfo: use print_link_quality_multipliers_array_entry in /interfaces
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 19:30:21 +0000 (20:30 +0100)]
jsoninfo: use the abuf_json_ip_address helper
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:41:19 +0000 (10:41 +0100)]
jsoninfo: improve and update /config
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 19:21:09 +0000 (20:21 +0100)]
jsoninfo: put printing a hna entry into a function and use it
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 13:21:45 +0000 (14:21 +0100)]
jsoninfo: minor improvements
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 13:20:52 +0000 (14:20 +0100)]
jsoninfo: simplify output_error by using an abuf
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:41:39 +0000 (10:41 +0100)]
jsoninfo: add some comments
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 8 Mar 2016 13:50:04 +0000 (14:50 +0100)]
jsoninfo: helpers: account for NaN and INF in float printing
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:17:17 +0000 (10:17 +0100)]
jsoninfo: helpers: output an empty string when the string is null
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:15:18 +0000 (10:15 +0100)]
jsoninfo: helpers: add asserts
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:16:33 +0000 (10:16 +0100)]
jsoninfo: helpers: move a static string declaration
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 09:29:28 +0000 (10:29 +0100)]
jsoninfo: minor improvement to /2hop
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 14:45:35 +0000 (15:45 +0100)]
main: do not allow nested shutdown
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 14:20:06 +0000 (15:20 +0100)]
scheduler: make olsr_flush_timers more robust
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 14:19:42 +0000 (15:19 +0100)]
scheduler: do not stop timers that are not running
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 14:18:47 +0000 (15:18 +0100)]
scheduler: fix a typo
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 7 Mar 2016 15:12:34 +0000 (16:12 +0100)]
jsoninfo: fix a windows compile error
src/olsrd_jsoninfo_helpers.c: In function 'abuf_json_int':
src/olsrd_jsoninfo_helpers.c:145:22: error: unknown conversion type character 'l' in format [-Werror=format=]
abuf_appendf(abuf, "\"%s\": %lld", key, value);
^
src/olsrd_jsoninfo_helpers.c:145:22: error: too many arguments for format [-Werror=format-extra-args]
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sun, 6 Mar 2016 11:38:58 +0000 (12:38 +0100)]
jsoninfo: simplify /plugins
Treat all plugin parameters as strings, just like the
plugin loader does and just like in the configuration
file.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sun, 6 Mar 2016 11:37:42 +0000 (12:37 +0100)]
jsoninfo: make abuf_json_int take a long long value
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sun, 6 Mar 2016 12:50:37 +0000 (13:50 +0100)]
bmf: ignore case on the BmfMechanism plugin parameter value
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sun, 6 Mar 2016 16:03:38 +0000 (17:03 +0100)]
config: always lower-case plugin parameter names
Case is already ignored and this avoids extra code in other plugins.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sun, 6 Mar 2016 09:59:26 +0000 (10:59 +0100)]
jsoninfo: show more information in /version
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 21:03:12 +0000 (22:03 +0100)]
builddata: generate more build information
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 20:33:07 +0000 (21:33 +0100)]
jsoninfo: improve the skip condition in ipc_print_gateways_ipvx
Make it more readable, all the negations were confusing.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 20:24:22 +0000 (21:24 +0100)]
jsoninfo: improve the ipc_print_gateways_ipvx function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 19:36:31 +0000 (20:36 +0100)]
jsoninfo: improve printing a gateway entry, and add expiry/cleanup timers
Affects /gateways and /sgw
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 17:11:11 +0000 (18:11 +0100)]
jsoninfo: improve /mid and add validityTime of mid entry itself
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 14:59:09 +0000 (15:59 +0100)]
gui: fix a few clang warnings
src/ipc.c:165:17: warning: cast from 'char *' to 'union olsr_message *' increases required alignment from 1 to 4 [-Wcast-align]
msg = (union olsr_message *)&tmp[tmp_len];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ipc.c:184:19: warning: cast from 'char *' to 'union olsr_message *' increases required alignment from 1 to 4 [-Wcast-align]
msg = (union olsr_message *)tmp;
^~~~~~~~~~~~~~~~~~~~~~~~~
src/main.c:54:16: warning: cast from 'char *' to 'struct in_addr *' increases required alignment from 1 to 4 [-Wcast-align]
in.s_addr = ((struct in_addr *)(hp->h_addr_list[0]))->s_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.c:60:26: warning: cast from 'char *' to 'struct in_addr *' increases required alignment from 1 to 4 [-Wcast-align]
pin.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr_list[0]))->s_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 11:22:16 +0000 (12:22 +0100)]
make: fix compiler flags probing
Basically reverts
"make: need to load the OS specific makefile before evaluating WARNINGS"
d9b773d94c5f84a769a20a563f9cf25a81a030fa.
and then adds OS specific compiler support
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 11:28:19 +0000 (12:28 +0100)]
make: move -Werror flag into the normal list of warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 11:22:57 +0000 (12:22 +0100)]
make: do not add -Wcast-qual on Windows
It triggers a _lot_ of warnings in src/win32/compat.h
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 14:30:32 +0000 (15:30 +0100)]
make: improve clang support
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 5 Mar 2016 10:37:31 +0000 (11:37 +0100)]
main: add noreturn attribute on olsr_segv_handler
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 19:09:29 +0000 (20:09 +0100)]
txtinfo: check INFO_HTTP_OK upon entry of the function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 19:09:07 +0000 (20:09 +0100)]
jsoninfo: remove some dead code
INFO_HTTP_OK was already checked upon entry of the function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 18:56:57 +0000 (19:56 +0100)]
info: check for retry after trying to send
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 18:27:25 +0000 (19:27 +0100)]
info: speed up sending pending responses
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 18:20:11 +0000 (19:20 +0100)]
info: try to send the response immediately
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 18:18:06 +0000 (19:18 +0100)]
info: add a comment about why info_plugin_outbuffer_t is there
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 16:37:56 +0000 (17:37 +0100)]
jsoninfo: improve /hna
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 16:22:59 +0000 (17:22 +0100)]
jsoninfo: improve /topology, show more information
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 15:15:42 +0000 (16:15 +0100)]
jsoninfo: add etx to /routes
And protect against a possible null-deref.
Minor optimisation.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 14:38:47 +0000 (15:38 +0100)]
jsoninfo: add hysteresis to /links
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 14:04:31 +0000 (15:04 +0100)]
jsoninfo: all neighbour entries now have twoHopNeighborCount
Affects a 2-hop neighbour entry, it gains this field.
Also improve ipc_print_neighbors_internal
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 12:49:34 +0000 (13:49 +0100)]
jsoninfo: re-arrange some imports
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 12:55:12 +0000 (13:55 +0100)]
jsoninfo: output an error on unknown status codes too
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 12:56:52 +0000 (13:56 +0100)]
txtinfo: move a function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 4 Mar 2016 12:56:02 +0000 (13:56 +0100)]
txtinfo: output an error on unknown status codes too
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 1 Mar 2016 10:29:37 +0000 (11:29 +0100)]
main: cleanup the gateways earlier on shutdown
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 1 Mar 2016 10:28:50 +0000 (11:28 +0100)]
main: print the received signal name instead of the signal number
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 1 Mar 2016 10:39:32 +0000 (11:39 +0100)]
scheduler: fix olsr_flush_timers to not hang
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Sat, 27 Feb 2016 12:12:43 +0000 (13:12 +0100)]
cfgparser: remove some unreachable code
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Feb 2016 23:48:28 +0000 (00:48 +0100)]
main: ensure all timers are stopped in shutdown
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Feb 2016 23:20:24 +0000 (00:20 +0100)]
scheduler: mark timers for removal and only remove them in a cleanup walk
Fixes crashes in networks with many nodes.
*** olsr.org - pre-0.9.1-git_dd7c5a0-hash_b9729ef932ee0c718b5da79dcf6a5fce ***
Build date: 2016-02-24 21:02:23 on jenkins
http://www.olsr.org
/usr/sbin/olsrd (olsr_segv_handler) src/main.c:323
/lib/i386-linux-gnu/libc.so.6 (+0x2de78) [0xb760ce78]
/usr/sbin/olsrd (list_remove) src/common/list.c:105
/usr/sbin/olsrd (olsr_stop_timer) src/scheduler.c:874
/usr/sbin/olsrd (olsr_del_nbr2_list) src/neighbor_table.c:85
/usr/sbin/olsrd (olsr_delete_neighbor_table) src/neighbor_table.c:211
/usr/sbin/olsrd (olsr_delete_link_entry) src/link_set.c:375
/usr/sbin/olsrd (olsr_expire_link_entry) src/link_set.c:495
/usr/sbin/olsrd (walk_timers) src/scheduler.c:650
/usr/sbin/olsrd (olsr_scheduler) src/scheduler.c:506
/usr/sbin/olsrd (main) src/main.c:705
olsrd crashed, stack trace follows
/usr/sbin/olsrd (olsr_segv_handler) src/main.c:323
/lib/i386-linux-gnu/libc.so.6 (+0x2de78) [0xb764ce78]
/usr/sbin/olsrd (list_remove) src/common/list.c:105
/usr/sbin/olsrd (olsr_stop_timer) src/scheduler.c:874
/usr/sbin/olsrd (olsr_update_gateway_entry) src/gateway.c:1208
/usr/sbin/olsrd (olsr_input_hna) src/hna_set.c:446
/usr/sbin/olsrd (parse_packet) src/parser.c:393
/usr/sbin/olsrd (olsr_input) src/parser.c:496
/usr/sbin/olsrd (poll_sockets) src/scheduler.c:341
/usr/sbin/olsrd (olsr_scheduler) src/scheduler.c:499
/usr/sbin/olsrd (main) src/main.c:705
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Feb 2016 21:11:01 +0000 (22:11 +0100)]
scheduler: fix a typo
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 23:00:12 +0000 (00:00 +0100)]
make: add new GCC 6 warning flags
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:24:19 +0000 (19:24 +0100)]
quagga: fix GCC 6 warnings
src/plugin.c:57:66: error: logical ‘and’ of equal expressions [-Werror=logical-op]
for (i = 0; i < ARRAYSIZE(zroute_types) && i < ZEBRA_ROUTE_MAX; i++) {
^~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:51:50 +0000 (19:51 +0100)]
pud: fix GCC 6 warnings
src/netTools.c: In function ‘getIPv4Address’:
src/netTools.c:96:55: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
return &((struct sockaddr_in *)(void *) &ifr->ifr_addr)->sin_addr;
^
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:49:01 +0000 (19:49 +0100)]
p2pd: fix GCC 6 warnings
src/NetworkInterfaces.c: In function ‘CreateInterface’:
src/NetworkInterfaces.c:247:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->intAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr;
^
src/NetworkInterfaces.c:260:52: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->broadAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr))->sin_addr;
^
src/NetworkInterfaces.c: In function ‘CreateNonOlsrNetworkInterfaces’:
src/NetworkInterfaces.c:368:40: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ipAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr->ifr_addr))->sin_addr;
^
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:46:20 +0000 (19:46 +0100)]
mdns: fix GCC 6 warnings
src/NetworkInterfaces.c: In function ‘CreateRouterElectionSocket’:
src/NetworkInterfaces.c:288:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ipv4_addr = ((struct sockaddr_in *)(void *) &req.ifr_addr)->sin_addr;
^
src/NetworkInterfaces.c: In function ‘CreateHelloSocket’:
src/NetworkInterfaces.c:383:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ipv4_addr = ((struct sockaddr_in *)(void *) &req.ifr_addr)->sin_addr;
^
src/NetworkInterfaces.c: In function ‘CreateInterface’:
src/NetworkInterfaces.c:541:49: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->intAddr.v4 = ((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr;
^
src/NetworkInterfaces.c:554:51: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->broadAddr.v4 = ((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr))->sin_addr;
^
src/NetworkInterfaces.c: In function ‘CreateBmfNetworkInterfaces’:
src/NetworkInterfaces.c:662:39: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ipAddr.v4 = ((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr->ifr_addr))->sin_addr;
^
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:16:12 +0000 (19:16 +0100)]
bmf: fix GCC 6 warnings
src/NetworkInterfaces.c: In function ‘CreateLocalEtherTunTap’:
src/NetworkInterfaces.c:1275:25: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_addr))->sin_addr.s_addr = htonl(EtherTunTapIp);
^
src/NetworkInterfaces.c:1280:27: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_netmask))->sin_addr.s_addr = htonl(EtherTunTapIpMask);
^
src/NetworkInterfaces.c:1285:29: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_broadaddr))->sin_addr.s_addr = htonl(EtherTunTapIpBroadcast);
^
src/NetworkInterfaces.c: In function ‘CreateInterface’:
src/NetworkInterfaces.c:1497:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->intAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr;
^
src/NetworkInterfaces.c:1513:52: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
newIf->broadAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr))->sin_addr;
^
src/NetworkInterfaces.c: In function ‘CreateBmfNetworkInterfaces’:
src/NetworkInterfaces.c:1626:40: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ipAddr.v4 = ((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifr->ifr_addr))->sin_addr;
^
src/NetworkInterfaces.c: In function ‘AddMulticastRoute’:
src/NetworkInterfaces.c:1944:12: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_dst))->sin_addr.s_addr = htonl(0xE0000000);
^~~~~~~~~~~
src/NetworkInterfaces.c:1945:12: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_genmask))->sin_addr.s_addr = htonl(0xF0000000);
^~~~~~~~~~~
src/NetworkInterfaces.c: In function ‘DeleteMulticastRoute’:
src/NetworkInterfaces.c:1989:14: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_dst))->sin_addr.s_addr = htonl(0xE0000000);
^~~~~~~~~~~
src/NetworkInterfaces.c:1990:14: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_genmask))->sin_addr.s_addr = htonl(0xF0000000);
^~~~~~~~~~~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:25:31 +0000 (19:25 +0100)]
parser: fix GCC 6 warnings
src/parser.c:450:30: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
void * src = &((struct sockaddr_in *)(void *)&from)->sin_addr;
^~~~~~~~~~~
src/parser.c:454:30: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
void * src = &((struct sockaddr_in6 *)(void *)&from)->sin6_addr;
^~~~~~~~~~~~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 21:48:04 +0000 (22:48 +0100)]
sgw: fix GCC 6 warnings
src/gateway.c: In function ‘takeDownExpensiveGateways’:
src/gateway.c:701:17: error: potential null pointer dereference [-Werror=null-dereference]
if (worst_gw->gw->path_cost < current_gw_cost_boundary) {
~~~~~~~~^~~~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 21:55:18 +0000 (22:55 +0100)]
link_set: fix GCC 6 warnings
src/link_set.c: In function ‘update_link_entry’:
src/link_set.c:335:24: error: potential null pointer dereference [-Werror=null-dereference]
for (mult = cfg_inter->cnf->lq_mult; mult != NULL; mult = mult->next) {
~~~~~~~~~^~~~~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 18:36:46 +0000 (19:36 +0100)]
unix: fix GCC 6 warnings
src/unix/ifnet.c:270:109: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(&((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifp->int_addr))->sin_addr.s_addr, &((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr.s_addr,
^
src/unix/ifnet.c:277:45: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifp->int_addr = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_addr);
^
src/unix/ifnet.c:278:52: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
memcpy(&ifp->ip_addr, &((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr.s_addr, olsr_cnf->ipsize);
^
src/unix/ifnet.c:296:112: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(&((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifp->int_netmask))->sin_addr.s_addr, &((struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_netmask))->sin_addr.s_addr,
^
src/unix/ifnet.c:303:48: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifp->int_netmask = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_netmask);
^
src/unix/ifnet.c:332:52: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifp->int_broadaddr = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr);
^
src/unix/ifnet.c: In function ‘chk_if_up’:
src/unix/ifnet.c:604:44: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifs.int_addr = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_addr);
^
src/unix/ifnet.c:612:45: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifs.int_netmask = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_netmask);
^
src/unix/ifnet.c:625:49: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ifs.int_broadaddr = *(struct sockaddr_in *)ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr);
^
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 22:54:54 +0000 (23:54 +0100)]
make: sort warnings flags and make that section a bit easier to read
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Feb 2016 22:55:46 +0000 (23:55 +0100)]
make: remove conditionals in WARNINGS section, no longer needed
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>