Revision tags: release/14.0.0 |
|
#
ab393e95 |
| 12-Oct-2023 |
Kristof Provost <kp@FreeBSD.org> |
netlink: move NETLINK define to opt_global.h
Move the NETLINK define into opt_global.h so we can rely on it being set correctly, without having to remember to include opt_netlink.h. This ensures tha
netlink: move NETLINK define to opt_global.h
Move the NETLINK define into opt_global.h so we can rely on it being set correctly, without having to remember to include opt_netlink.h. This ensures that the NETLINK define is correctly set. If not we may end up with unloadable modules, due to missing symbols (such as nlmsg_get_group_writer).
PR: 274306 Reviewed by: imp, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42179
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
79379355 |
| 16-Jun-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: convert to IfAPI.
Convert to IfAPI everything except `IF_AFDATA_WLOCK` usage in neigh.c.
Reviewed By: jhibbits Differential Revision: https://reviews.freebsd.org/D40577
|
#
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 ...
|
#
fa554de7 |
| 11-May-2023 |
Kristof Provost <kp@FreeBSD.org> |
netlink: reduce default log levels
Reduce the default log level for netlink to LOG_INFO. This removes a number of messages such as
> [nl_iface] dump_sa: unsupported family: 0, skipping or > [nl_ifa
netlink: reduce default log levels
Reduce the default log level for netlink to LOG_INFO. This removes a number of messages such as
> [nl_iface] dump_sa: unsupported family: 0, skipping or > [nl_iface] get_operstate_ether: error calling SIOCGIFMEDIA on vlan0: 22
that are useful for debugging, but not for most users.
Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40062
show more ...
|
#
9e79038c |
| 28-Apr-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: fix netlink interface operations when netlink is loaded as a module.
This change completes 089104e0e01f.
MFC after: 2 weeks
|
#
089104e0 |
| 19-Apr-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: add netlink interfaces to if_clone
This change adds netlink create/modify/dump interfaces to the `if_clone.c`. The previous attempt with storing the logic inside `netlink/route/iface_driver
netlink: add netlink interfaces to if_clone
This change adds netlink create/modify/dump interfaces to the `if_clone.c`. The previous attempt with storing the logic inside `netlink/route/iface_drivers.c` did not quite work, as, for example, dumping interface-specific state (like vlan id or vlan parent) required some peeking into the private interfaces.
The new interfaces are added in a compatible way - callers don't have to do anything unless they are extended with Netlink.
Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D39032 MFC after: 1 month
show more ...
|
Revision tags: release/13.2.0 |
|
#
ce9f95bd |
| 03-Mar-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: fix vlan interface creation
MFC after: 2 weeks
|
#
6694cb1f |
| 17-Feb-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: fix if_allocdescr() malloc options argument.
The current value was based on the initial revision of D37566 and was not updated afterwards.
MFC after: 1 day
|
#
25c2dd2f |
| 09-Feb-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: return optional metadata with the operation result.
Some operations like interface creation may need to return metadata - in this case, interface name - back to the caller if the operation
netlink: return optional metadata with the operation result.
Some operations like interface creation may need to return metadata - in this case, interface name - back to the caller if the operation is successful. This change implements attaching an `NLMSGERR_ATTR_COOKIE` nla to the operation reply message via `nlmsg_report_cookie()`. Additionally, on successful interface creation, interface index and interface name are returned in the `IFLA_NEW_IFINDEX` and `IFLA_IFNAME TLVs, encapsulated in the `NLMSGERR_ATTR_COOKIE`.
Reviewed By: pauamma Differential Revision: https://reviews.freebsd.org/D38283 MFC after: 1 week
show more ...
|
#
80f03e63 |
| 14-Dec-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: improve interface handling
* Separate interface creation from interface modification code * Support setting some interface attributes (ifdescr, mtu, up/down, promisc) * Improve interaction
netlink: improve interface handling
* Separate interface creation from interface modification code * Support setting some interface attributes (ifdescr, mtu, up/down, promisc) * Improve interaction with the cloners requiring to parse/write custom interface attributes * Add bitmask-based way of checking if the attribute is present in the message * Don't use multipart RTM_GETLINK replies when searching for the specific interface names * Use ENODEV instead of ENOENT in case of failed RTM_GETLINK search * Add python netlink test helpers * Add some netlink interface tests
Differential Revision: https://reviews.freebsd.org/D37668
show more ...
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
7e5bf684 |
| 20-Jan-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
netlink: add netlink support
Netlinks is a communication protocol currently used in Linux kernel to modify, read and subscribe for nearly all networking state. Interfaces, addresses, routes, firew
netlink: add netlink support
Netlinks is a communication protocol currently used in Linux kernel to modify, read and subscribe for nearly all networking state. Interfaces, addresses, routes, firewall, fibs, vnets, etc are controlled via netlink. It is async, TLV-based protocol, providing 1-1 and 1-many communications.
The current implementation supports the subset of NETLINK_ROUTE family. To be more specific, the following is supported: * Dumps: - routes - nexthops / nexthop groups - interfaces - interface addresses - neighbors (arp/ndp) * Notifications: - interface arrival/departure - interface address arrival/departure - route addition/deletion * Modifications: - adding/deleting routes - adding/deleting nexthops/nexthops groups - adding/deleting neghbors - adding/deleting interfaces (basic support only) * Rtsock interaction - route events are bridged both ways
The implementation also supports the NETLINK_GENERIC family framework.
Implementation notes: Netlink is implemented via loadable/unloadable kernel module, not touching many kernel parts. Each netlink socket uses dedicated taskqueue to support async operations that can sleep, such as interface creation. All message processing is performed within these taskqueues.
Compatibility: Most of the Netlink data models specified above maps to FreeBSD concepts nicely. Unmodified ip(8) binary correctly works with interfaces, addresses, routes, nexthops and nexthop groups. Some software such as net/bird require header-only modifications to compile and work with FreeBSD netlink.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36002 MFC after: 2 months
show more ...
|