summaryrefslogtreecommitdiff
path: root/sysdep/bsd
AgeCommit message (Collapse)Author
2022-01-08IO: Support nonlocal bind in socket interfaceAlexander Zubkov
Add option to socket interface for nonlocal binding, i.e. binding to an IP address that is not present on interfaces. This behaviour is enabled when SKF_FREEBIND socket flag is set. For Linux systems, it is implemented by IP_FREEBIND socket flag. Minor changes done by commiter.
2021-12-27BSD: Assume onlink flag on ifaces with only host addressesOndrej Zajicek (work)
The BSD kernel does not support the onlink flag and BIRD does not use direct routes for next hop validation, instead depends on interface address ranges. We would like to handle PtMP cases with only host addresses configured, like: ifconfig wg0 192.168.0.10/32 route add 192.168.0.4 -iface wg0 route add 192.168.0.8 -iface wg0 To accept BIRD routes with onlink next-hop, like: route 192.168.42.0/24 via 192.168.0.4%wg0 onlink BIRD would dismiss the route when receiving from the kernel, as the next-hop 192.168.0.4 is not part of any interface subnet and onlink flag is not kept by the BSD kernel. The commit fixes this by assuming that for routes received from the kernel, any next-hop is onlink on ifaces with only host addresses. Thanks to Stefan Haller for the original patch.
2021-05-10BSD: Propagate OS-level IFF_MULTICAST to internal IF_MULTICAST flagToke Høiland-Jørgensen
The BSD code did not propagate the OS-level IFF_MULTICAST flag to the Bird-internal IF_MULTICAST flag, which causes problems with Wireguard interfaces on FreeBSD. The Linux sysdep code does propagate the flag already, so just copy over the same check and flag update.
2021-04-19BSD: Fix invalid pointer derefence in logging codeStefan Haller
For logging purposes a stack allocated net_addr struct was passed by value as vararg (instead of the expected pointer). This resulted in a segfault when the specific error condition got logged.
2020-05-01Nest: Added const to ea_show just to declare that this shouldn't really ↵Maria Matejka
change anything
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2020-02-27BGP: Support for MD5SIG together with remote rangeOndrej Zajicek (work)
When dynamic BGP with remote range is configured, MD5SIG needs to use newer socket option (TCP_MD5SIG_EXT) to specify remote addres range for listening socket. Thanks to Adam Kułagowski for the suggestion.
2019-12-19KRT: Remove KRF_SYNC_ERROR flagOndrej Zajicek (work)
This info is now stored in an internal bmap. Unfortunately, net.flags is still needed for temporary kernel data.
2019-01-04BSD: Fix TCP-MD5 code on current FreeBSD kernelsOndrej Zajicek (work)
Current FreeBSD kernels require SA records for both directions. Thanks to Joseph Mulloy and Andrey V. Elsukov for reporting and solving the issue.
2018-07-28BSD: Use MSG_DONTROUTE for unicast packets on FreeBSDOndrej Zajicek (work)
BSD systems cannot use SO_DONTROUTE, because it does not work properly with multicast packets (perhaps it tries to find iface based on multicast group address). But we can use MSG_DONTROUTE sendmsg() flag for unicast packets. Works on FreeBSD, is ignored on OpenBSD and is broken on NetBSD (i guess due to integrated routing table and ARP table).
2018-06-27BSD: Fix of the previous commitOndrej Zajicek (work)
2018-06-26Config: Dropping CF_ADDTO.Jan Maria Matejka
2018-05-30Nest: Removing separate tmpa from route propagationJan Maria Matejka
This is a fundamental change of an original (1999) concept of route processing inside BIRD. During import/export, there was a temporary ea_list created which was to be used instead of the another one inside the route itself. This led to some confusion, quirks, and strange filter code that handled extended route attributes. Dropping it now. The protocol interface has changed in an uniform way -- the `struct ea_list *attrs` argument has been removed from store_tmp_attrs(), import_control(), rt_notify() and get_route_info().
2018-01-14KRT: Fix direct routes for BSDOndrej Zajicek (work)
Old way to set direct routes is to use local IP as gateway, but that does not work properly on newer FreeBSDs. Now we use sockaddr_dl containing interface index as gateway.
2017-12-12Fix some minor issuesOndrej Zajicek (work)
2017-12-08Enable ECMP and Link detection by defaultOndrej Zajicek (work)
ECMP is not enabled on BSD, where it is not supported by BIRD.
2017-12-07Merge commit '98bb80a243b58c43453e9be69d19d0350286549c' into int-newOndrej Zajicek (work)
2017-12-07BSD: Fix in the last commitOndrej Zajicek (work)
2017-12-07BSD: Minor fix of penultimate commitOndrej Zajicek (work)
2017-12-07Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addressesOndrej Zajicek (work)
Also redesign preferred address selection and update protocols to use appropriate preferred address. Based on a previous work by Jan Maria Matejka.
2017-09-04BSD: Fix alignment issueOndrej Zajicek (work)
Incorrect structure alignment breaks kernel routing table updates on FreeBSD/ARM (and perhaps other platforms). Thanks to Eugene Sevastyanov for the original patch.
2017-04-29BSD: Fix address scan on OpenBSDOndrej Zajicek (work)
2017-04-29Minor fixesOndrej Zajicek (work)
2017-02-22Merge branch 'int-new' into nexthop-mergedJan Moskyto Matejka
2017-02-20Several minor fixesOndrej Zajicek (work)
2017-02-08Merge branch 'master' into int-newOndrej Zajicek (work)
2017-01-17Fix IP_HDRINCL usage on FreeBSD 11Ondrej Zajicek (work)
FreeBSD 11 changed endianity of ip_len field from host order to network order. Also DragonFly BSD allegedly expects network order here. Thanks to Olivier Cochard-Labbé for the patch.
2016-12-22Removing (struct rta)->cast. Never used.Jan Moskyto Matejka
2016-12-22Merged multipath and single-path data structures.Jan Moskyto Matejka
Dropped struct mpnh and mpnh_*() Now struct nexthop exists, nexthop_*(), and also included struct nexthop into struct rta. Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is needed to distinguish between these two cases, RTD_DEVICE is equivalent to IPA_ZERO(a->nh.gw), RTD_ROUTER is then IPA_NONZERO(a->nh.gw). From now on, we also explicitely want C99 compatible compiler. We assume that this 20-year norm should be known almost everywhere.
2016-11-09 Unit Testing for BIRDOndrej Zajicek (work)
- Unit Testing Framework (BirdTest) - Integration of BirdTest into the BIRD build system - Tests for several BIRD modules Based on squashed Pavel Tvrdik's int-test branch, updated for current int-new branch.
2016-11-08Merge branch 'master' into int-newOndrej Zajicek (work)
2016-11-08Merge tag 'v1.6.2' into int-newOndrej Zajicek (work)
2016-11-01BSD: Fix build on OpenBSD broken by previous commitOndrej Zajicek (work)
2016-11-01Build: switch on -Wextra, get rid of most of the warningsJan Moskyto Matejka
There are several unresolved -Wmissing-field-initializers on older versions of GCC than 5.1, all of them false positive.
2016-09-29Kernel socket missing err_hook fixJan Moskyto Matejka
Thanks to Tim Weippert for bugreport.
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-17BSD: Fix setkey in int-new branchOndrej Zajicek (work)
2016-05-12Merge remote-tracking branch 'origin/master' into int-newOndrej Zajicek (work)
2016-05-10Merge branch 'int-new' into int-new-mergedJan 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-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-08Merge branch 'master' into int-new-channelsJan Moskyto Matejka
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-02-01BSD: compilation error fixJan Moskyto Matejka
2016-01-21BSD: fix no-return warningJan Moskyto Matejka
2016-01-21BSD: Explicitly dropping routes with mismatched AF's.Jan Moskyto Matejka
2016-01-20BSD integration fixesJan Moskyto Matejka
2015-12-21Follow-up work on integrationOndrej Zajicek (work)
Contains some patches from Jan 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-12-18Netlink and BSD: Integrating IPv4 and IPv6Jan Moskyto Matejka
Squashing and minor changes by Ondrej Santiago Zajicek