Commit Graph

7 Commits

Author SHA1 Message Date
075ab46d39 Clang: do not use angle brackets for local includes 2019-10-04 00:47:17 +02:00
Martin Stein
bf1428be18 nic_router: simplify routing rule classes
* Get rid of the base classes Rule and Leaf_rule,
* Make log output about initiated or invalid routing rules conform to the rest
  of the router log, and
* Ensure that each type of routing rule when being invalid invalidates its
  whole domain.

Issue #2840
2018-06-12 12:11:44 +02:00
Martin Stein
92a30e0953 nic_router: handle configuration changes
The router reacts as follows to a configuration change:

1) Construct new internal configuration representation (the old one stays
   in place to be able to do comparisons in the following steps)
2) Iterate through all user-dependent objects (interfaces, link states, ARP
   information, DHCP information) and re-check which remain valid with the
   new configuration and which must be dismissed.
3) Adapt the objects that remain valid to the new configuration (re-write
   references) and remove or detach the dismissed objects.
4) Do a link state DOWN at each interface and a link state UP at each
   interface that remains attached to a domain.
5) Replace the old internal configuration representation with the new one

This way, the router keeps as much user dependent states as possible
while going through a configuration change. Thus, overwriting the old
configuration with an exact copy of itself is (almost) transparent to
clients of the router. Almost, because there are things the router must
do on every configuration handling, like re-scheduling the expiration
timeouts of links.

Ref #2670
2018-03-29 15:39:44 +02:00
Martin Stein
0ca248551a net: move Ipv4_address_prefix to nic_router
As this tool is not used by any other component make it local to the
NIC router to keep the net-lib interface small.

Ref #2534
2017-11-06 13:57:21 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Martin Stein
591ed80dcf NIC router: hand-over XML nodes by value
Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
89085096d2 nic_router: new user interface and optimizations
Fixes #2139
2016-11-30 13:38:05 +01:00