#
361a8395 |
| 02-Mar-2025 |
Andrey V. Elsukov <ae@FreeBSD.org> |
routing: do not allow PINNED routes to be overriden
First configured PINNED routes should have higher priority.
Fixes: 1da4954c92ea MFC after: 2 weeks Differential Revision: https://reviews.freebs
routing: do not allow PINNED routes to be overriden
First configured PINNED routes should have higher priority.
Fixes: 1da4954c92ea MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48650
show more ...
|
#
f2644d64 |
| 28-Feb-2025 |
Andrey V. Elsukov <ae@FreeBSD.org> |
routing: set net.route.multipath=0 when kernel doesn't have ROUTE_MPATH
MFC after: 1 week
|
Revision tags: release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0 |
|
#
1da4954c |
| 13-Nov-2024 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table.
PR: 277125 Reported by: Oleksandr Ignatyev <alex@i.org.ua> Reviewed by: ae,
Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table.
PR: 277125 Reported by: Oleksandr Ignatyev <alex@i.org.ua> Reviewed by: ae, jlduran Tested by: jlduran Differential Revision: https://reviews.freebsd.org/D47534 MFC after: 2 weeks
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
c35a43b2 |
| 02-Apr-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: allow exact-match route lookups via RTM_GETROUTE.
Use already-existing RTM_F_PREFIX rtm_flag to indicate that the request assumes exact-prefix lookup instead of the longest-prefix-match.
netlink: allow exact-match route lookups via RTM_GETROUTE.
Use already-existing RTM_F_PREFIX rtm_flag to indicate that the request assumes exact-prefix lookup instead of the longest-prefix-match.
MFC after: 2 weeks
show more ...
|
#
a0aa160b |
| 17-Feb-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: always pass rtentry to add_route_flags().
add_route_flags() uses `rt` prefix data to lookup the the current rtentry from the routing table. Update rib_add_route_px() to always pass rtentr
routing: always pass rtentry to add_route_flags().
add_route_flags() uses `rt` prefix data to lookup the the current rtentry from the routing table. Update rib_add_route_px() to always pass rtentry regardless of the op_flags.
Reported by: Stefan Grundmann <sg2342@googlemail.com> MFC after: 1 day
show more ...
|
#
2c2b37ad |
| 13-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
ifnet/API: Move struct ifnet definition to a <net/if_private.h>
Hide the ifnet structure definition, no user serviceable parts inside, it's a netstack implementation detail. Include it temporarily
ifnet/API: Move struct ifnet definition to a <net/if_private.h>
Hide the ifnet structure definition, no user serviceable parts inside, it's a netstack implementation detail. Include it temporarily in <net/if_var.h> until all drivers are updated to use the accessors exclusively.
Reviewed by: glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38046
show more ...
|
#
06e87959 |
| 30-Dec-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add missed RIB_WUNLOCK in the add_route_flags().
MFC after: 2 weeks
|
Revision tags: release/12.4.0 |
|
#
000250be |
| 08-Sep-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add abitity to set the protocol that installed route/nexthop.
Routing daemons such as bird need to know if they install certain route so they can clean it up on startup, as a form of achie
routing: add abitity to set the protocol that installed route/nexthop.
Routing daemons such as bird need to know if they install certain route so they can clean it up on startup, as a form of achieving consistent state during the crash recovery. Currently they use combination of routing flags (RTF_PROTO1) to detect these routes when interacting via route(4) rtsock protocol. Netlink protocol has a special "rtm_protocol" field that is filled and checked by the route originator. To prepare for the upcoming netlink introduction, add ability to record origing to both nexthops and nexthop groups via <nhop|nhgrp>_<get|set>_origin() KPI. The actual calls will be used in the followup commits.
MFC after: 1 month
show more ...
|
#
578a99c9 |
| 29-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: improve multiline debug
Add IF_DEBUG_LEVEL() macro to ensure all debug output preparation is run only if the current debug level is sufficient. Consistently use it within routing subsyste
routing: improve multiline debug
Add IF_DEBUG_LEVEL() macro to ensure all debug output preparation is run only if the current debug level is sufficient. Consistently use it within routing subsystem.
MFC after: 2 weeks
show more ...
|
#
fe05d1dd |
| 29-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: extend nhop(9) kpi
* add nhop_get_unlinked() used to prepare referenced but not linked nexthop, that can later be used as a clone source. * add nhop_check_gateway() to check for allowed ad
routing: extend nhop(9) kpi
* add nhop_get_unlinked() used to prepare referenced but not linked nexthop, that can later be used as a clone source. * add nhop_check_gateway() to check for allowed address family combinations between the rib family and neighbor family (useful for 4o6 or direct routes) * add nhop_set_upper_family() to allow copying IPv6 nexthops to IPv4 rib. * add rt_get_rnd() wrapper, returning both nexthop/group and its weight attached to the rtentry. * Add CHT_SLIST_FOREACH_SAFE(), allowing to delete items during iteration.
MFC after: 2 weeks
show more ...
|
#
c24a8f19 |
| 29-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: fix rib_add_route_px()
Fix panic in newly-added rib_add_route_px() by removin unlocked prefix lookup.
MFC after: 2 weeks
|
#
db4ca190 |
| 29-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add ability to store opaque indentifiers in nhops/nhgs
This is a pre-requisite for the direct nexthop/nexhop group operations via netlink.
MFC after: 2 weeks
|
#
730bfa28 |
| 12-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add rib_match_gw() helper
Finish 02e05b8faec1: * add gateway matcher function that can be used in rib_del_route_px() or any rib_walk-family functions. It will be used in the upcoming migr
routing: add rib_match_gw() helper
Finish 02e05b8faec1: * add gateway matcher function that can be used in rib_del_route_px() or any rib_walk-family functions. It will be used in the upcoming migration to the new KPI * rename gw_fulter_func to match_gw_one() to better signal the function purpose / semantic.
MFC after: 1 month
show more ...
|
#
69077c81 |
| 11-Aug-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
routing: fix non-debug build
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
40503b79 |
| 07-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: populate fibs with interface routes after growing net.fibs.
Currently it is possible to extend number of fibs in runtime, but this functionality is of limited use when net.add_addrs_all_fi
routing: populate fibs with interface routes after growing net.fibs.
Currently it is possible to extend number of fibs in runtime, but this functionality is of limited use when net.add_addrs_all_fibs is non-zero, as the routing tables are created empty.
This change automatically populate newly-created fibs with the kernel-originated interface routes (filtered by RTF_PINNED flag) if net.add_addrs_all_fibs is set.
``` -> sysctl net.add_addr_allfibs=1 net.add_addr_allfibs: 0 -> 1 -> sysctl net.fibs net.fibs: 2 -> sysctl net.fibs=3 net.fibs: 2 -> 3
BEFORE: -> setfib 2 netstat -rn Routing tables (fib: 2)
AFTER: -> setfib 2 netstat -rn Routing tables (fib: 2)
Internet: Destination Gateway Flags Netif Expire 10.0.0.0/24 link#1 U vtnet0 10.0.0.5 link#1 UHS lo0 127.0.0.1 link#2 UH lo0
Internet6: Destination Gateway Flags Netif Expire ::1 link#2 UHS lo0 2a01:4f9:3a:fa00::/64 link#1 U vtnet0 2a01:4f9:3a:fa00:5054:ff:fe15:4a3b link#1 UHS lo0 fe80::%vtnet0/64 link#1 U vtnet0 fe80::5054:ff:fe15:4a3b%vtnet0 link#1 UHS lo0 fe80::%lo0/64 link#2 U lo0 fe80::1%lo0 link#2 UHS lo0 ```
Differential Revision: https://reviews.freebsd.org/D36075 MFC after: 1 month
show more ...
|
#
02e05b8f |
| 11-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: fixup empty mask prefix handling after 2ce553854cbd.
MFC after: 1 month
|
#
258828d0 |
| 11-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: fix build warning without ROUTE_MPATH
Reported by: Gary Jennejohn <garyj@gmx.de> MFC after: 1 month
|
#
685866bb |
| 10-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: fix build without ROUTE_MPATH
MFC after: 1 month
|
#
5c4d2252 |
| 08-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: move rtentry and subscription code out of route_ctl.c
route_ctl.c size has grown considerably since initial introduction. Factor out non-relevant parts: * all rtentry logic, such as creatio
routing: move rtentry and subscription code out of route_ctl.c
route_ctl.c size has grown considerably since initial introduction. Factor out non-relevant parts: * all rtentry logic, such as creation/destruction and accessors goes to net/route/route_rtentry.c * all rtable subscription logic goes to net/route/route_subscription.c
Differential Revision: https://reviews.freebsd.org/D36074 MFC after: 1 month
show more ...
|
#
2ce55385 |
| 04-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add rib_<add|del>_route_px() functions operating with nexthops.
This change adds public KPI to work with routes using pre-created nexthops, instead of using data from addrinfo structures.
routing: add rib_<add|del>_route_px() functions operating with nexthops.
This change adds public KPI to work with routes using pre-created nexthops, instead of using data from addrinfo structures. These functions will be later used for adding/deleting kernel-originated routes and upcoming netlink protocol.
As a part of providing this KPI, low-level route addition code has been reworked to provide more control over route creation or change. Specifically, a number of operation flags (RTM_F_<CREATE|EXCL|REPLACE|APPEND>) have been added, defining the desired behaviour the the route already exists (or not exists). This change required some changes in the multipath addition code, resulting in moving this code to route_ctl.c, rendering mpath_ctl.c empty.
Differential Revision: https://reviews.freebsd.org/D36073 MFC after: 1 month
show more ...
|
#
66230639 |
| 04-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: split nexthop creation and rtentry creation.
This change is required for the upcoming introduction of the next nexhop-based operations KPI, as it will create rtentry and nexthops at diffe
routing: split nexthop creation and rtentry creation.
This change is required for the upcoming introduction of the next nexhop-based operations KPI, as it will create rtentry and nexthops at different stages of route table modification.
Differential Revision: https://reviews.freebsd.org/D36072 MFC after: 2 weeks
show more ...
|
#
dedeec11 |
| 03-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: refactor #2
* Use same filter func (rib_filter_f_t) for nexhtop groups to simplify callbacks. * simplify conditional route deletion & remove the need to pass rt_addrinfo to the low-level
routing: refactor #2
* Use same filter func (rib_filter_f_t) for nexhtop groups to simplify callbacks. * simplify conditional route deletion & remove the need to pass rt_addrinfo to the low-level deletion functions * speedup rib_walk_del() by removing an additional per-prefix lookup
Differential Revision: https://reviews.freebsd.org/D36071 MFC after: 1 month
show more ...
|
#
0d60e88b |
| 02-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: refactor control cmds #1
This and the follow-up routing-related changes target to remove or reduce `struct rt_addrinfo` usage and use recently-landed nhop(9) KPI instead. Traditionally `r
routing: refactor control cmds #1
This and the follow-up routing-related changes target to remove or reduce `struct rt_addrinfo` usage and use recently-landed nhop(9) KPI instead. Traditionally `rt_addrinfo` structure has been used to propagate all necessary information between the protocol/rtsock and a routing layer. Many functions inside routing subsystem uses it internally. However, using this structure became somewhat complicated, as there are too many ways of specifying a single state and verifying data consistency is hard. For example, arerouting flgs consistent with mask/gateway sockaddr pointers? Is mask really a host mask? Are sockaddr "valid" (e.g. properly zeroed, masked, have proper length)? Are they mutable? Is the suggested interface specified by the interface index embedded into the sockadd_dl gateway, or passed as RTAX_IFP parameter, or directly provided by rti_ifp or it needs to be derived from the ifa? These (and other similar) questions have to be considered every time when a function has `rt_addrinfo` pointer as an argument.
The new approach is to bring more control back to the protocols and construct the desired routing objects themselves - in the end, it's the protocol/subsystem who knows the desired outcome.
This specific diff changes the following: * add explicit basic low-level radix operations: add_route() (renamed from add_route_nhop()) delete_route() (factored from change_route_nhop()) change_route() (renamed from change_route_nhop) * remove "info" parameter from change_route_conditional() as a part of reducing rt_addrinfo usage in the internal KPIs * add lookup_prefix_rt() wrapper for doing re-lookups after RIB lock/unlock
Differential Revision: https://reviews.freebsd.org/D36070 MFC after: 2 weeks
show more ...
|