summaryrefslogtreecommitdiff
path: root/proto/ospf/iface.c
AgeCommit message (Collapse)Author
2021-09-10OSPF: Setting a list node NULL before useMaria Matejka
2021-05-10OSPF: Allow ifaces with host address as unnumbered PtP or PtMP ifacesOndrej Zajicek (work)
Ifaces with host address (/32) were forced to be stubby, but now they can be used as PtP or PtMP. For these ifaces we need to: - Do not force stub mode - Accept packets from any IP as local - Accept any configured neighbor as local - Detect ifaces properly as unnumbered - Use ONLINK flag for nexthops
2020-05-26OSPF: Fix handling of unnumbered PtPsOndrej Zajicek (work)
This issue has a long history. In 2012, we changed data field for unnumbered PtP links from iface id (specified by RFC) to IP address based on reports of bugs in Quagga that required it, and we used out-of-band information to distinquish unnumberred PtPs with the same local IP address. Then with OSPF graceful restart implementation, we found that we can no longer use out-of-band information, and we need to use only LSAdb info for routing table calculation, but i forgot to finish handling of this case, so multiple unnumbered PtPs with the same local IP addresses were broken. Considering that even recent Mikrotik RouterOS has broken next hop calculation that depends on IP address in PtP link data field, we cannot just switch back to the iface id for unnumbered PtP links. The patch makes two changes: First, it goes back to use out-of-band (position) info for distinguishing local interfaces in SPF when graceful restart is not enabled, while still uses LSAdb-only approach for SPF calculation when graceful restart is enabled. Second, it adds OSPF interface option 'ptp address', which controls whether IP address or iface id is used in data field. It is enabled by default except for unnumbered PtP links with enabled graceful restart. Thanks to Kenth Eriksson for the bugreport and Joakim Tjernlund for suggestions.
2020-01-09OSPF: Fix bad initialization of tx_hdrlen fieldOndrej Zajicek (work)
Function ifa_tx_hdrlen() uses fields autype and passwords, so it must be called after these are set. Thanks to Kenth Eriksson for the bugreport.
2019-07-04OSPF: Update DR when local priority changesOndrej Zajicek (work)
When priority is reconfigured locally, we need to trigger DR election.
2019-06-30OSPF: Support for graceful restartOndrej Zajicek (work)
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart, for both restarting and helper sides. Graceful restart is initiated by 'graceful down' command.
2018-12-10OSPF: Fix reconfiguration of vlinksOndrej Zajicek (work)
Fix crash during reconfiguration of OSPF config with vlinks. When vlink is reconfigured, a generic iface-reconfiguration code is used, which in one place supposes that it is running on a regular iface. Thanks to Cybertinus for a bugreport.
2018-10-25OSPF: Fix some trace messagesOndrej Zajicek (work)
Missing argument in MTU change trace message can crash bird when MTU change happens and trace messages are active. Thanks to Alexander Velkov for the bugreport.
2018-04-25OSPF: Support of authentication trailer for OSPFv3Ondrej Zajicek (work)
Implement RFC 7166, crypthographic authentication for OSPFv3 analogous to authentication used for OSPFv2.
2017-12-07Merge commit '7b2c5f3d2826e3175bf31b1c36056c9efc587a2b' into int-newOndrej Zajicek (work)
2017-12-07Timers: Revert temporary names and remove old timer.hOndrej Zajicek (work)
2017-12-07OSPF: Update to new timersOndrej Zajicek (work)
Note that recurrent timers are currently limited to ~1 hour.
2017-12-07Timers: Replace old timers with microsecond timersOndrej Zajicek (work)
The old timer interface is still kept, but implemented by new timers. The plan is to switch from the old inteface to the new interface, then clean it up.
2017-10-10OSPF: Support of address families in OSPFv3Ondrej Zajicek (work)
OSPFv3-AF can handle multiple topologies of diferent address families (IPv4, IPv6, both unicast and multicast) using separate instances distinguished by instance ID ranges.
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.
2016-11-08Merge branch 'master' into int-newOndrej Zajicek (work)
2016-11-02OSPF: Use message authentication interfaceOndrej Zajicek (work)
Based on former commit from Pavel Tvrdik
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-04-08Merge branch 'master' into int-new-channelsJan Moskyto Matejka
2016-02-25OSPF: Multicast ability is irrelevant for stub interfacesOndrej Zajicek (work)
2016-01-11Hidden AF_INET* inside sysdep/Jan Moskyto Matejka
2015-12-24Follow-up work on integrationOndrej Zajicek (work)
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-11-12Follow-up commit on integrated BIRDOndrej Zajicek (work)
Use net_addr for interface address prefixes, support net_addr in configuration parser.
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-08-19OSPF: Fixes some issues with link detectionOndrej Zajicek
Thanks to Bernardo Figueiredo and Israel G. Lugo for the bugreport.
2015-06-01Typo fix by Hans van KranenburgOndrej Filip
2014-11-03Bugfix in latest OSPF changes.Ondrej Zajicek
2014-11-03Bugfix to OSPF reconfiguration.Ondrej Zajicek
2014-11-03Fininshing integrated OSPF.Ondrej Zajicek
2014-10-24Refactoring of OSPF messages.Ondrej Zajicek
2014-07-19Whitespace cleanup in OSPF.Ondrej Zajicek
2014-07-18Temporary integrated OSPF commit.Ondrej Zajicek
2014-06-26Temporary integrated OSPF commit.Ondrej Zajicek
2014-05-18IPv4/IPv6 integrated socket code.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-24OSPF ifaces on loopback should be stub.Ondrej Zajicek
2013-11-19BFD protocol, ready for release.Ondrej Zajicek
Supports OSPF and BGP and also statically configured sessions.
2013-07-11Some fixes for TTL security.Ondrej Zajicek
2013-06-25Implements TTL security for OSPF and RIP.Ondrej Zajicek
Interfaces for OSPF and RIP could be configured to use (and request) TTL 255 for traffic to direct neighbors. Thanks to Simon Dickhoven for the original patch for RIPng.
2013-06-24Better packet priority and traffic class handling.Ondrej Zajicek
Implements support for IPv6 traffic class, sets higher priority for OSPF and RIP outgoing packets by default and allows to configure ToS/DS/TClass IP header field and the local priority of outgoing packets.
2013-05-28Fixes crash with vlinks.Ondrej Zajicek
2013-04-17Fixes a compatibility issue in OSPFv2 PtP links.Ondrej Zajicek
BIRD used zero netmask in hello packets on all PtP links, not just on unnumbered ones. This patch fixes it and adds option 'ptp netmask' for overriding the default behavior. Thanks to Alexander V. Chernikov for the original patch.
2013-04-16Better handling of global addresses as configured NBMA neighbors in OSPFv3.Ondrej Zajicek
Configured NBMA neighbors in OSPFv3 should be link-local addresses, old behavior was to silently ignore global ones. The patch allows BIRD to accept global ones, but adds a warning and a documentation notice. Thanks to Wilco Baan Hofman for the bugreport.
2012-11-10Fixes OSPF reconfigure w.r.t. downed ifaces.Ondrej Zajicek
2012-10-31Fixes another bug in OSPFv3 vlinks.Ondrej Zajicek
2012-05-14Real broadcast mode for OSPFv2.Ondrej Zajicek
2012-03-16Fixes broken vlinks in OSPF.Ondrej Zajicek
2012-03-15Fixes TTL for multicast OSPF packets.Ondrej Zajicek
Thanks Alexander V. Chernikov for the suggestion.