summaryrefslogtreecommitdiff
path: root/sysdep/unix
AgeCommit message (Collapse)Author
2016-09-29Kernel socket missing err_hook fixJan Moskyto Matejka
Thanks to Tim Weippert for bugreport.
2016-09-15Main: Improve BIRD help messagesPavel Tvrdik
2016-09-15rt-table: Fix kernel protocol export filter memory bugPavel Tvrdik
Kernel protocol calls rt_export_merged(), which used @rte_update_pool for temporary allocations, supposing it is called from other functions from rt-table.c that handles locking and flushing of the linpool. Therefore, linpool was not flushed properly and memory leaked. Add linpool argument to rt_export_merged() and use @krt_filter_lp when called from kernel protocol. Thanks to Justin Cattle and Alexander Frolkin for the bugreport. (Commit squashed and updated by Ondrej Zajicek)
2016-08-31KRT: Fix trivial errorOndrej Zajicek (work)
2016-08-30KRT: Forbid path merging on BSDOndrej Zajicek (work)
We support ECMP routes only on Linux. Exported routes are checked in krt_capable(), but a route generated during path merging avoids this check.
2016-08-16whitespace fixesOndřej Surý
2016-07-11Log: Fix error handling of debug file openOndrej Zajicek (work)
Logging is not yet initialized, we have to use fprintf() here. Thanks to Pavel Tvrdik for noticing and debugging it.
2016-06-27cppcheck: fix va_end() functionsPavel Tvrdík
2016-06-08Fix declaration of shared global variables async_*Pavel Tvrdik
In a header file write it with extern keyword. And in one of the *.c file declare it without extern keyword.
2016-05-30Unix IO: Tried to fix strange behavior after POLLHUP or POLLERR.Jan Moskyto Matejka
2016-05-24After-master-merge simple fixes.Jan Moskyto Matejka
BSD lib/setkey.h and lib/sysio.h #include fixes. OpenBSD's flex needs -o param without space. V6ONLY for SK_IP fix.
2016-05-17IO: Minor changes in socket AF handingOndrej Zajicek (work)
AF can be specified implicitly by saddr or daddr, flags SKF_V4ONLY and SKF_V6ONLY are to be removed.
2016-05-12Merge remote-tracking branch 'origin/master' into int-newOndrej Zajicek (work)
2016-05-12Miscellaneous minor fixesOndrej Zajicek (work)
2016-05-12Prog Doc: Complete several missing parametersPavel Tvrdik
2016-05-10Merge branch 'int-new' into int-new-mergedJan Moskyto Matejka
2016-05-10Merge remote-tracking branch 'origin/rte-update' into int-newJan Moskyto Matejka
2016-05-10Build system reworked to one global Makefile with includes and no nestingJan Moskyto Matejka
Also removed the lib-dir merging with sysdep. Updated #include's accordingly. Fixed make doc on recent Debian together with moving generated doc into objdir. Moved Makefile.in into root dir Retired all.o and birdlib.a Linking the final binaries directly from all the .o files.
2016-05-03Initialize variable ifr in sk_setup()Pavel Tvrdik
==00:00:00:02.831 2468== Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s) ==00:00:00:02.831 2468== at 0x513BDEA: setsockopt (in /usr/lib/libc-2.23.so) ==00:00:00:02.831 2468== by 0x45C7AF: sk_setup (io.c:1216) ==00:00:00:02.831 2468== by 0x45CDFF: sk_open (io.c:1417) ==00:00:00:02.831 2468== by 0x44B562: rip_open_socket (packets.c:740) ==00:00:00:02.831 2468== by 0x4481A7: rip_iface_locked (rip.c:616) ==00:00:00:02.831 2468== by 0x4133E4: olock_run_event (locks.c:177) ==00:00:00:02.831 2468== by 0x45A6DE: ev_run (event.c:85) ==00:00:00:02.831 2468== by 0x45A7AD: ev_run_list (event.c:142) ==00:00:00:02.831 2468== by 0x45E0FC: io_loop (io.c:2066) ==00:00:00:02.831 2468== by 0x463B56: main (main.c:845) ==00:00:00:02.831 2468== Address 0xffefffd24 is on thread 1's stack ==00:00:00:02.831 2468== in frame #1, created by sk_setup (io.c:1188) ==00:00:00:02.831 2468== Uninitialised value was created by a stack allocation ==00:00:00:02.831 2468== at 0x45C6BB: sk_setup (io.c:1188)
2016-04-13BSD: Add the IPsec SA/SP database entries controlOndrej Zajicek (work)
Add code for manipulation with TCP-MD5 keys in the IPsec SA/SP database at FreeBSD systems. Now, BGP MD5 authentication (RFC 2385) keys are handled automatically on both Linux and FreeBSD. Based on patches from Pavel Tvrdik.
2016-04-08Route update: move table lookup from protocols into rte_update2().Jan Moskyto Matejka
Many protocols do almost the same when creating a rte_update request before calling rte_update2(). This commit should simplify the protocol side of the route-creation routine.
2016-04-08Merge branch 'master' into int-new-channelsJan Moskyto Matejka
2016-04-07Main: Add local optionOndrej Zajicek (work)
Add option that changes default paths for config file and control socket to the current working directory.
2016-04-07Channelize: rt_notify arg conversion table -> channelJan Moskyto Matejka
2016-04-06IO: Avoid multiple event cycles in one loop cycle.Ondrej Zajicek (work)
Event cycle may took too much time and trigger next timer events, so avoid cycling between timer and event cycles inside the loop cycle.
2016-04-06IO: Replace RX priority heuristic with explicit markOndrej Zajicek (work)
In BIRD, RX has lower priority than TX with the exception of RX from control socket. The patch replaces heuristic based on socket type with explicit mark and uses it for both control socket and BGP session waiting to be established. This should avoid an issue when during heavy load, outgoing connection could connect (TX event), send open, but then failed to receive OPEN / establish in time, not sending notifications between and therefore got hold timer expired error from the neighbor immediately after it finally established the connection.
2016-04-06KRT: Fix route learn scan when route changedOndrej Zajicek (work)
When a kernel route changed, function krt_learn_scan() noticed that and replaced the route in internal kernel FIB, but after that, function krt_learn_prune() failed to propagate the new route to the nest, because it confused the new route with the (removed) old best route and decided that the best route did not changed. Wow, the original code (and the bug) is almost 17 years old.
2016-03-30IO/Poll: fix mistaken variable mergeJan Moskyto Matejka
The events variable is used in the short loop decision. The reasons are not much clear, keeping this to keep the former behaviour.
2016-03-18Unix: Substituted select -> poll also in congestion checkerJan Moskyto Matejka
It does strange things when even one fd larger than FD_SETSIZE is passed to select().
2016-03-15Poll: Prevent the improbable case of EAGAIN after POLLINJan Moskyto Matejka
2016-03-11Unix: Rework of select-loop to poll-loopJan Moskyto Matejka
This should lift the limit of FD_SETSIZE and allow more than 1024 fd's. FD_SETSIZE limit doesn't matter now when creating new sockets.
2016-02-11Unix: Fix bug in syslog name handlingOndrej Zajicek (work)
Pointer to current_log_name has to be changed even if the name is the same, because the old one will be invalid/freed after reconfiguration.
2016-02-01Channels - explicit links between protocols and tablesOndrej Zajicek (work)
The patch adds support for channels, structures connecting protocols and tables and handling most interactions between them. The documentation is missing yet.
2016-01-27io.c: fix reads from uninitialized memoryPavel Tvrdík
2016-01-20Add forgotten semicolonPavel Tvrdík
2016-01-11Hidden AF_INET* inside sysdep/Jan Moskyto Matejka
2015-12-24Follow-up work on integrationOndrej Zajicek (work)
2015-12-22Better fix of missing AF_INET6? definition in lib/socket.hJan Moskyto Matejka
Moved the code to sysdep.
2015-12-21Modify FIB_WALK() and FIB_ITERATE() to work with new FIB codeOndrej Zajicek (work)
Returned user data pointers have offset relative to fib_node.
2015-12-21Follow-up work on integrationOndrej Zajicek (work)
Contains some patches from Jan Moskyto Matejka
2015-12-20KRT: Integration of IPv4/IPv6 in sysdep/linuxOndrej Zajicek (work)
2015-12-20ROA code switchoffJan Moskyto Matejka
2015-12-19Removed BITS_PER_IP_ADDRESS, MAX_PREFIX_LENGTH, BIRD_AFJan Moskyto Matejka
Explicit setting of AF_INET(6|) in IP socket creation. BFD set to listen on v6, without setting the V6ONLY flag to catch both v4 and v6 traffic. Squashing and minor changes by Ondrej Santiago Zajicek
2015-11-25Merge branch 'master' into int-newOndrej Zajicek (work)
2015-11-23Nest: Fix bug in device protoOndrej Zajicek (work)
If an interface address notification is received during device protocol shutdown/restart, BIRD crashed. Thanks to Wei Huang for the bugreport.
2015-11-12Follow-up commit on integrated BIRDOndrej Zajicek (work)
Use net_addr for interface address prefixes, support net_addr in configuration parser.
2015-11-11Netlink: Allow more than 256 routing tables.Jan Moskyto Matejka
Since 2.6.19, the netlink API defines RTA_TABLE routing attribute to allow 32-bit routing table IDs. Using this attribute to index routing tables at Linux, instead of 8-bit rtm_table field.
2015-11-09Conf: Fixes bug in symbol lookup during reconfigurationOndrej Zajicek (work)
Symbol lookup by cf_find_symbol() not only did the lookup but also added new void symbols allocated from cfg_mem linpool, which gets broken when lookups are done outside of config parsing, which may lead to crashes during reconfiguration. The patch separates lookup-only cf_find_symbol() and config-modifying cf_get_symbol(), while the later is called only during parsing. Also new_config and cfg_mem global variables are NULLed outside of parsing.
2015-11-05Initial commit on integrated BIRDOndrej Zajicek (work)
New data types net_addr and variants (in lib/net.h) describing network addresses (prefix/pxlen). Modifications of FIB structures to handle these data types and changing everything to use these data types instead of prefix/pxlen pairs where possible. The commit is WiP, some protocols are not yet updated (BGP, Kernel), and the code contains some temporary scaffolding. Comments are welcome.
2015-11-03IO: Fix the previous bugfixOndrej Zajicek (work)
I should check it after making some trivial changes. The original patch from Alexander has it right.