#
4f96be33 |
| 24-Mar-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
icmp6: move ICMPv6 related tunables to the files where they are used
Most of them can be declared as static after the move out of in6_proto.c. Keeping sysctl(9) declarations with their text descript
icmp6: move ICMPv6 related tunables to the files where they are used
Most of them can be declared as static after the move out of in6_proto.c. Keeping sysctl(9) declarations with their text descriptions next to the variable declaration create self-documenting code. There should be no functional changes.
Differential Revision: https://reviews.freebsd.org/D44481
show more ...
|
Revision tags: 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/
|
Revision tags: release/13.2.0 |
|
#
3d0d5b21 |
| 23-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop in
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop including the header in the future.
Sponsored by: Juniper Networks, Inc. Reviewed by: glebius, melifaro Differential Revision: https://reviews.freebsd.org/D38200
show more ...
|
Revision tags: release/12.4.0 |
|
#
7b3440fc |
| 29-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Revert "routing: install prefix and loopback routes using new nhop-based KPI."
Temporarily revert the commit to unblock testing.
This reverts commit a1b59379db7d879551118b921f6e9692b4bf200c.
|
#
835a611e |
| 09-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: make IPv6 defrouter code use new nhop-based KPI.
MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D36168
|
#
a1b59379 |
| 08-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: install prefix and loopback routes using new nhop-based KPI.
Construct the desired hexthops directly instead of using the "translation" layer in form of filling rt_addrinfo data. Simplify
routing: install prefix and loopback routes using new nhop-based KPI.
Construct the desired hexthops directly instead of using the "translation" layer in form of filling rt_addrinfo data. Simplify V_rt_add_addr_allfibs handling by using recently-added rib_copy_route() to propagate the routes to the non-primary address fibs.
MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D36166
show more ...
|
#
8036234c |
| 23-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes
Summary: Currently netinet6/ code allocates IPv6 prefixes (nd_prefix) for both manually-assigned addresses and advertised pr
netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes
Summary: Currently netinet6/ code allocates IPv6 prefixes (nd_prefix) for both manually-assigned addresses and advertised prefixes. As a result, prefixes from manually-assigned prefixes can be seen in `ndp -p` list and be cleared via `ndp -P`. The latter relies on the SIOCSPFXFLUSH_IN6 ioctl to clear to prefix list. The original intent of the SIOCSPFXFLUSH_IN6 was to clear prefixes originated from the advertising routers:
``` 1998-09-02 JINMEI, Tatuya <jinmei@isl.rdc.toshiba.co.jp> * nd6.c (nd6_ioctl): added 2 new ioctls; SIOCSRTRFLUSH_IN6 and SIOCSPFXFLUSH_IN6. The former is to flush all default routers in the default router list, and the latter is to flush all the prefixes and the addresses derived from them in the prefix list. ```
Restore the intent by marking prefixes derived from the RA messages with newly-added ndpr_flags.ra_derived flag and skip prefixes not marked with such flag during deletion and listing.
Differential Revision: https://reviews.freebsd.org/D36312 MFC after: 2 weeks
show more ...
|
#
9d16275c |
| 12-Aug-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netinet6: simplify defrouter_select_fib()
* factor out underlying llentry check into a separate function and use it consistently * enter epoch once instead of per-router enter/exit * don't execute b
netinet6: simplify defrouter_select_fib()
* factor out underlying llentry check into a separate function and use it consistently * enter epoch once instead of per-router enter/exit * don't execute body with fibnum = `RT_ALL_FIBS`
Differential Revision: https://reviews.freebsd.org/D35523 MFC after: 2 weeks
show more ...
|
#
800c6846 |
| 29-Jul-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
routing: add nhop(9) kpi.
Differential Revision: https://reviews.freebsd.org/D35985 MFC after: 1 month
|
Revision tags: release/13.1.0 |
|
#
c55ecce1 |
| 27-Mar-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
netinet6: Fix a typo in a source code comment
- s/maping/mapping/
MFC after: 3 days
|
#
d74b7bae |
| 04-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet_byindex() actually requires network epoch
Sweep over potentially unsafe calls to ifnet_byindex() and wrap them in epoch. Most of the code touched remains unsafe, as the returned pointer is be
ifnet_byindex() actually requires network epoch
Sweep over potentially unsafe calls to ifnet_byindex() and wrap them in epoch. Most of the code touched remains unsafe, as the returned pointer is being used after epoch exit. Mark that with a comment.
Validate the index argument inside the function, reducing argument validation requirement from the callers and making V_if_index private to if.c.
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D33263
show more ...
|
Revision tags: release/12.3.0 |
|
#
f8c1b1a9 |
| 22-Aug-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
lltable: fix crash introduced in c541bd368f86.
Reported by: cy MFC after: 2 weeks
|
#
c1dd4d64 |
| 12-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()
Commit 81728a538 ("Split rtinit() into multiple functions.") removed the initialization of sa6, but not one of its uses. This mean
nd6: Avoid using an uninitialized sockaddr in nd6_prefix_offlink()
Commit 81728a538 ("Split rtinit() into multiple functions.") removed the initialization of sa6, but not one of its uses. This meant that we were passing an uninitialized sockaddr as the address to lltable_prefix_free(). Remove the variable outright to fix the problem. The caller is expected to hold a reference on pr.
Fixes: 81728a538 ("Split rtinit() into multiple functions.") Reported by: KMSAN Reviewed by: donner MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30166
show more ...
|
Revision tags: release/13.0.0 |
|
#
cc3fa1e2 |
| 24-Feb-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix crash with rtadv-originated multipath IPv6 routes.
PR: 253800 Reported by: Frederic Denis <freebsdml at hecian.net> MFC after: immediately
|
#
9c4a8d24 |
| 23-Feb-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix nd6 rib_action() handling.
rib_action() guarantees valid rc filling IFF it returns without error. Check rib_action() return code instead of checking rc fields.
PR: 253800 Reported by: Frederic
Fix nd6 rib_action() handling.
rib_action() guarantees valid rc filling IFF it returns without error. Check rib_action() return code instead of checking rc fields.
PR: 253800 Reported by: Frederic Denis <freebsdml@hecian.net> MFC after: immediately
show more ...
|
#
81728a53 |
| 09-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Split rtinit() into multiple functions.
rtinit[1]() is a function used to add or remove interface address prefix routes, similar to ifa_maintain_loopback_route(). It was intended to be family-agno
Split rtinit() into multiple functions.
rtinit[1]() is a function used to add or remove interface address prefix routes, similar to ifa_maintain_loopback_route(). It was intended to be family-agnostic. There is a problem with this approach in reality.
1) IPv6 code does not use it for the ifa routes. There is a separate layer, nd6_prelist_(), providing interface for maintaining interface routes. Its part, responsible for the actual route table interaction, mimics rtenty() code.
2) rtinit tries to combine multiple actions in the same function: constructing proper route attributes and handling iterations over multiple fibs, for the non-zero net.add_addr_allfibs use case. It notably increases the code complexity.
3) dstaddr handling. flags parameter re-uses RTF_ flags. As there is no special flag for p2p connections, host routes and p2p routes are handled in the same way. Additionally, mapping IFA flags to RTF flags makes the interface pretty messy. It make rtinit() to clash with ifa_mainain_loopback_route() for IPV4 interface aliases.
4) rtinit() is the last customer passing non-masked prefixes to rib_action(), complicating rib_action() implementation.
5) rtinit() coupled ifa announce/withdrawal notifications, producing "false positive" ifa messages in certain corner cases.
To address all these points, the following has been done:
* rtinit() has been split into multiple functions: - Route attribute construction were moved to the per-address-family functions, dealing with (2), (3) and (4). - funnction providing net.add_addr_allfibs handling and route rtsock notificaions is the new routing table inteface. - rtsock ifa notificaion has been moved out as well. resulting set of funcion are only responsible for the actual route notifications.
Side effects: * /32 alias does not result in interface routes (/32 route and "host" route) * RTF_PINNED is now set for IPv6 prefixes corresponding to the interface addresses
Differential revision: https://reviews.freebsd.org/D28186
show more ...
|
#
d68cf57b |
| 07-Jan-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Refactor rt_addrmsg() and rt_routemsg().
Summary: * Refactor rt_addrmsg(): make V_rt_add_addr_allfibs decision locally. * Fix rt_routemsg() and multipath by accepting nexthop instead of interface po
Refactor rt_addrmsg() and rt_routemsg().
Summary: * Refactor rt_addrmsg(): make V_rt_add_addr_allfibs decision locally. * Fix rt_routemsg() and multipath by accepting nexthop instead of interface pointer. * Refactor rtsock_routemsg(): avoid accessing rtentry fields directly. * Simplify in_addprefix() by moving prefix search to a separate function.
Reviewers: #network
Subscribers: imp, ae, bz
Differential Revision: https://reviews.freebsd.org/D28011
show more ...
|
#
7511a638 |
| 22-Nov-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Refactor rib iterator functions.
* Make rib_walk() order of arguments consistent with the rest of RIB api * Add rib_walk_ext() allowing to exec callback before/after iteration. * Rename rt_foreach_f
Refactor rib iterator functions.
* Make rib_walk() order of arguments consistent with the rest of RIB api * Add rib_walk_ext() allowing to exec callback before/after iteration. * Rename rt_foreach_fib_walk_del -> rib_foreach_table_walk_del * Rename rt_forach_fib_walk -> rib_foreach_table_walk * Move rib_foreach_table_walk{_del} to route/route_helpers.c * Slightly refactor rib_foreach_table_walk{_del} to make the implementation consistent and prepare for upcoming iterator optimizations.
Differential Revision: https://reviews.freebsd.org/D27219
show more ...
|
Revision tags: release/12.2.0 |
|
#
4caea9b1 |
| 19-Oct-2020 |
Mark Johnston <markj@FreeBSD.org> |
icmp6: Count packets dropped due to an invalid hop limit
Pad the icmp6stat structure so that we can add more counters in the future without breaking compatibility again, last done in r358620. Annota
icmp6: Count packets dropped due to an invalid hop limit
Pad the icmp6stat structure so that we can add more counters in the future without breaking compatibility again, last done in r358620. Annotate the rarely executed error paths with __predict_false while here.
Reviewed by: bz, melifaro Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26578
show more ...
|
#
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
#
c7aa572c |
| 31-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
e1c05fd2 |
| 21-Jul-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Transition from rtrequest1_fib() to rib_action().
Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). Thi
Transition from rtrequest1_fib() to rib_action().
Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). This is part of the new routing KPI.
Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25546
show more ...
|
#
72587123 |
| 19-Jul-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Temporarly revert r363319 to unbreak the build.
Reported by: CI Pointy hat to: melifaro
|
#
8cee15d9 |
| 19-Jul-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Transition from rtrequest1_fib() to rib_action().
Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). This
Transition from rtrequest1_fib() to rib_action().
Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). This is part of the new routing KPI.
Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25546
show more ...
|
#
4c7ba83f |
| 12-Jul-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Switch inet6 default route subscription to the new rib subscription api.
Old subscription model allowed only single customer.
Switch inet6 to the new subscription api and eliminate the old model.
Switch inet6 default route subscription to the new rib subscription api.
Old subscription model allowed only single customer.
Switch inet6 to the new subscription api and eliminate the old model.
Differential Revision: https://reviews.freebsd.org/D25615
show more ...
|