summaryrefslogtreecommitdiff
path: root/sysdep/unix
AgeCommit message (Collapse)Author
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-05-30Unix IO: Tried to fix strange behavior after POLLHUP or POLLERR.Jan Moskyto Matejka
2016-05-12Prog Doc: Complete several missing parametersPavel Tvrdik
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-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-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.
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-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-03IO: Fix the previous bugfixOndrej Zajicek (work)
I should check it after making some trivial changes. The original patch from Alexander has it right.
2015-11-03IO: Handle fd values too big for select()Ondrej Zajicek (work)
If the number of sockets is too much for select(), we should at least handle it with proper error messages and reject new sockets instead of breaking the event loop. Thanks to Alexander V. Chernikov for the patch.
2015-06-08BGP multipath supportOndrej Zajicek
Kernel option 'merge paths' allows to merge routes exported to kernel protocol (currently BGP and static routes) to multipath routes.
2015-06-08KRT: Fixes some minor bugs in kernel protocolOndrej Zajicek
2015-06-08unsigned [int] -> uintPavel Tvrdík
2015-05-12KRT: Add support for plenty of kernel route metricsOndrej Zajicek
Linux kernel route metrics (RTA_METRICS netlink route attribute) are represented and accessible as new route attributes: krt_mtu, krt_window, krt_rtt, krt_rttvar, krt_sstresh, krt_cwnd, krt_advmss, krt_reordering, krt_hoplimit, krt_initcwnd, krt_rto_min, krt_initrwnd, krt_quickack, krt_lock_mtu, krt_lock_window, krt_lock_rtt, krt_lock_rttvar, krt_lock_sstresh, krt_lock_cwnd, krt_lock_advmss, krt_lock_reordering, krt_lock_hoplimit, krt_lock_rto_min, krt_feature_ecn, krt_feature_allfrag
2015-04-25KRT: Fixes route reloadOndrej Zajicek
Did not really worked
2015-04-25KRT: Fixes learning of preferred kernel routes.Ondrej Zajicek
When a new route was imported from kernel and chosen as preferred, then the old best route was propagated as a withdraw to the kernel protocol. Under some circumstances such withdraw propagated to the BSD kernel could remove the new alien route and thus reverting the import.
2015-04-19Fixes port range socket optionOndrej Zajicek
2015-03-29BGP: Enhanced route refresh (RFC 7313) supportOndrej Zajicek
Also hook feed_done is renamed to feed_end.
2015-03-02Fixes bug in debug dumpsOndrej Zajicek
Using 'dump sockets' in IPv6 mode caused crash due to mismatched format string. Thanks to Pavel Tvrdik for noticing it.
2015-03-02Implement latency tracking, internal event log and watchdogOndrej Zajicek
2015-02-22Use IP_PORTRANGE_HIGH for BFD where availableOndrej Zajicek
2015-02-21Store protocol config size inside protocol structureOndrej Zajicek
Make proto_config_new() use this info instead of supplied size. Thanks to Alexander V. Chernikov for the patch.
2015-02-21Add const to a param msg at functions log_msg, log_rl, die, bug and debugPavel Tvrdik
2015-02-21Replacing GNU old-style field designator extensionPavel Tvrdik
2014-11-03Fininshing integrated OSPF.Ondrej Zajicek
2014-10-24Integrated IP functions.Ondrej Zajicek
2014-10-02Implements token bucket filter for rate limiting.Ondrej Zajicek
2014-10-02Refresh kernel protocol when interface disappears.Ondrej Zajicek
When an interface goes down, (Linux) kernel removes routes pointing to that ifacem but does not send withdraws for them. We rescan the kernel table to ensure synchronization. Thanks to Alexander Demenshin for the bugreport.
2014-10-02Fixes some warnings.Ondrej Zajicek
2014-06-26Ensures that msg_controllen includes last padding.Ondrej Zajicek
Although RFC 3542 allows both cases, Theo de Raadt thinks he knows better, and msg_controllen without last padding fails on OpenBSD. Thanks to Job Snijders for the bugreport.
2014-05-29String constants could be used for string option values.Ondrej Zajicek
Thanks to Frederik Kriewitz for the patch.
2014-05-18IPv4/IPv6 integrated socket code.Ondrej Zajicek
2014-03-20BGP graceful restart support.Ondrej Zajicek
Also significant core protocol state changes needed for that, global graceful restart recovery state and kernel proto support for recovery.
2014-02-07Workaround thread-unsafeness of cli_echo().Ondrej Zajicek
2014-02-06Many changes in I/O and OSPF sockets and packet handling.Ondrej Zajicek
I/O: - BSD: specify src addr on IP sockets by IP_HDRINCL - BSD: specify src addr on UDP sockets by IP_SENDSRCADDR - Linux: specify src addr on IP/UDP sockets by IP_PKTINFO - IPv6: specify src addr on IP/UDP sockets by IPV6_PKTINFO - Alternative SKF_BIND flag for binding to IP address - Allows IP/UDP sockets without tx_hook, on these sockets a packet is discarded when TX queue is full - Use consistently SOL_ for socket layer values. OSPF: - Packet src addr is always explicitly set - Support for secondary addresses in BSD - Dynamic RX/TX buffers - Fixes some minor buffer overruns - Interface option 'tx length' - Names for vlink pseudoifaces (vlinkX) - Vlinks use separate socket for TX - Vlinks do not use fixed associated iface - Fixes TTL for direct unicast packets - Fixes DONTROUTE for OSPF sockets - Use ifa->ifname instead of ifa->iface->name
2013-11-25Merge branch 'master' into add-pathOndrej Zajicek
2013-11-25Use ISO 8601 timeformats by default.Ondrej Zajicek
2013-11-25Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.Ondrej Zajicek
Thanks to Alexander V. Chernikov for the original patch.
2013-11-23Merge branch 'master' into add-pathOndrej Zajicek
Conflicts: filter/filter.c nest/proto.c nest/rt-table.c proto/bgp/bgp.h proto/bgp/config.Y