summaryrefslogtreecommitdiff
path: root/nest/iface.c
AgeCommit message (Collapse)Author
2023-04-25Refactoring of domains connected to poolsMaria Matejka
2023-04-24Resource pools are now bound with domains.Maria Matejka
Memory allocation is a fragile part of BIRD and we need checking that everybody is using the resource pools in an appropriate way. To assure this, all the resource pools are associated with locking domains and every resource manipulation is thoroughly checked whether the appropriate locking domain is locked. With transitive resource manipulation like resource dumping or mass free operations, domains are locked and unlocked on the go, thus we require pool domains to have higher order than their parent to allow for this transitive operations. Adding pool locking revealed some cases of insecure memory manipulation and this commit fixes that as well.
2023-04-04Interface subsystem lockingMaria Matejka
2023-02-07Merge commit '0bb04d5390f21b0c96fc4894ba5d5510c541f0ef' into HEADMaria Matejka
2023-02-02Interface updates are asynchronousMaria Matejka
Instead of propagating interface updates as they are loaded from kernel, they are enqueued and all the notifications are called from a protocol-specific event. This change allows to break the locking loop between protocols and interfaces. Anyway, this change is based on v2 branch to keep the changes between v2 and v3 smaller.
2023-02-02Moved interface list flush to device protocol cleanup hook.Maria Matejka
The interface list must be flushed when device protocol is stopped. This was done in a hardcoded specific hook inside generic protocol routines. The cleanup hook was originally used for table reference counting late cleanup, yet it can be also simply used for prettier interface list flush.
2023-01-25VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2022-09-20Merge commit 'adf37d8e' into thread-nextMaria Matejka
2021-12-18Nest: Do not ignore secondary flag changes in ifa updatesOndrej Zajicek (work)
Compare all IA_* flags that are set by sysdep iface code. The old code ignores IA_SECONDARY flag when comparing whether iface address updates from kernel changed anything. This is usually not an issue as kernel removes all secondary addresses due to removal of the primary one, but it breaks when sysctl 'promote_secondaries' is enabled and kernel promotes secondary addresses to primary ones. Thanks to 'Alexander' for the bugreport.
2021-11-22VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2020-05-11Nest: Fix neighbor handling for colliding rangesOndrej Zajicek (work)
Resolve neighbors using longest prefix match. Although interface ranges should not generally collide, it may happen for unnumbered links. Thanks to Kenth Eriksson for the bugreport.
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2019-07-24Nest: VRF of protocol can be explicitly specified as 'default'Ondrej Zajicek (work)
Protocol can have specified VRF, in such case it is restricted to a set of ifaces associated with the VRF, otherwise it can use all interfaces. The patch allows to specify VRF as 'default', in which case it is restricted to a set of iface not associated with any VRF.
2018-11-28Nest: Do not hard-reset interface when preferred address is changedOndrej Zajicek (work)
Modify protocols to use preferred address change notification instead on depending on hard-reset of interfaces in that case, and remove hard-reset in that case. This avoids issue when e.g. IPv6 protocol restarts interface when IPv4 preferred address changed (as hard-reset is unavoidable and common for whole iface). The patch also fixes a bug when removing last address does not send preferred address change notification.
2018-11-05Filter: Make ifname attribute modifiableOndrej Zajicek (work)
Allow to change an interface associated with a route by setting ifname attribute. It will also change the route to a direct one.
2018-10-11Nest: Fix 'show interfaces summary' commandOndrej Zajicek (work)
The command showed interfaces that were removed / in shutdown.
2018-02-07Nest: Trivial whitespace cleanupOndrej Zajicek (work)
2017-12-16Minor fixes for debug modeOndrej Zajicek (work)
2017-12-10Several minor fixesOndrej Zajicek (work)
2017-12-08Nest: Minor formatting changesOndrej Zajicek (work)
2017-12-07Merge commit '7b2c5f3d2826e3175bf31b1c36056c9efc587a2b' into int-newOndrej Zajicek (work)
2017-12-07Merge commit '98bb80a243b58c43453e9be69d19d0350286549c' into int-newOndrej 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-10-17Iface address debug dump fixJan Moskyto Matejka
2017-09-06Basic VRF supportOndrej Zajicek (work)
Add basic VRF (virtual routing and forwarding) support. Protocols can be associated with VRFs, such protocols will be restricted to interfaces assigned to the VRF (as reported by Linux kernel) and will use sockets bound to the VRF. E.g., different multihop BGP instances can use diffent kernel routing tables to handle BGP TCP connections. The VRF support is preliminary, currently there are several limitations: - Recent Linux kernels (4.11) do not handle correctly sockets bound to interaces that are part of VRF, so most protocols other than multihop BGP do not work. This will be fixed by future kernel versions. - Neighbor cache ignores VRFs. Breaks config with the same prefix on local interfaces in different VRFs. Not much problem as single hop protocols do not work anyways. - Olock code ignores VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. - Incoming BGP connections are not dispatched according to VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. Perhaps we would need some kernel API to read VRF of incoming connection? Or probably use multiple listening sockets in int-new branch. - We should handle master VRF interface up/down events and perhaps disable associated protocols when VRF goes down. Or at least disable associated interfaces. - Also we should check if the master iface is really VRF iface and not some other kind of master iface. - BFD session request dispatch should be aware of VRFs. - Perhaps kernel protocol should read default kernel table ID from VRF iface so it is not necessary to configure it. - Perhaps we should have per-VRF default table.
2017-08-10Nicer log outputMichal 'vorner' Vaner
non-primary is ugly, just omit it (and use primary in the other case).
2017-08-10Less confusing log messageMichal 'vorner' Vaner
A non-primary address isn't necessarily secondary, that's an independent flag.
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-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.
2015-12-21Follow-up work on integrationOndrej Zajicek (work)
2015-12-20Integrated address print lengthsJan Moskyto Matejka
Minor changes by Ondrej Santiago Zajicek
2015-11-12Follow-up commit on integrated BIRDOndrej Zajicek (work)
Use net_addr for interface address prefixes, support net_addr in configuration parser.
2014-11-03Changes order of iface/addr/neigh event hooks.Ondrej Zajicek
Now the order is: Up -> iface, addr, neigh Down -> neigh, addr, iface It fixes the case when an iface appears, related static routes are activated and exported to OSPF before the iface notification and therefore forwarding addresses are not encoded in generated external LSAs.
2013-11-24Minor changes to default router ID calculation.Ondrej Zajicek
2013-04-16Allows IP of loopback to be used in automatic router ID selection.Ondrej Zajicek
Thanks to Alexander V. Chernikov for the patch.
2012-12-27Implements interface masks for choosing router id.Ondrej Zajicek
Router ID could be automatically determined based of subset of ifaces/addresses specified by 'router id from' option. The patch also does some minor changes related to router ID reconfiguration. Thanks to Alexander V. Chernikov for most of the work.
2012-01-23Implements handling of BSD iface arrival/departure notifications.Ondrej Zajicek
Thanks to Alexander V. Chernikov for original patch.
2012-01-23Fixes problems with creating/removing/renaming ifaces on BSD.Ondrej Zajicek
2012-01-21Fixes another minor bug in iface scan.Ondrej Zajicek
Iface flags are not updated in some cases.
2012-01-01Allows sticky link-local neighbors.Ondrej Zajicek
Allows using NEF_STICKY neighbors with link-local addresses. This is used for static route nexthops, they can be specified like fe80::1%eth0 .
2011-12-12Fixes problem with sticky neighbors and iface address changes.Ondrej Zajicek
Thanks Matthias Schiffer for the bugreport and the original patch.
2011-05-01There may be more IP address records with the same IP.Ondrej Zajicek
2011-03-28Minor changes in addresses.Ondrej Zajicek
Mainly changes IA_UNNUMBERED to IA_PEER and adds IA_HOST. Also do not show broadcast addr in show interfaces. Nobody cares for that.
2010-12-22Remove unnecessary check.Ondrej Zajicek
2010-11-11Adds support for iface link check to static protocol.Ondrej Zajicek
2010-11-11Implements link state detection.Ondrej Zajicek
Also changes some symbol names (IFF_ADMIN_DOWN -> IFF_SHUTDOWN, IFF_LINK_UP -> IFF_ADMIN_UP).
2010-03-19Allow iface pattern matching code to match peer address on ptp links.Ondrej Zajicek
2010-03-14Temporary OSPF commit - sockets.Ondrej Zajicek
2010-02-27Better flushing of interfaces.Ondrej Zajicek
When device protocol goes down, interfaces should be flushed asynchronously (in the same way like routes from protocols are flushed), when protocol goes to DOWN/HUNGRY. This fixes the problem with static routes staying in kernel routing table after BIRD shutdown.
2009-05-29Implements primary address selection base on 'primary' option.Ondrej Zajicek