netlink: fix vlan interface creationMFC after: 2 weeks
tests: add netlink large dump buffer checkDifferential Revision: https://reviews.freebsd.org/D38665MFC after: 2 weeks
tests: fix netlink test_dump_ifaces_many test.Consider only loopback interfaces when counting.Otherwise, if pf is loaded, 'pflog0' gets added to the vnet, breaking the test.MFC after: 2 weeks
netlink: fix interface dump.The current code missed interface addition when reallocating temporary buffer.Tweak the code to perform the reallocation first and add interface afterwards unconditio
netlink: fix interface dump.The current code missed interface addition when reallocating temporary buffer.Tweak the code to perform the reallocation first and add interface afterwards unconditionally.Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>MFC after: 3 days
show more ...
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 theoperation 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: pauammaDifferential Revision: https://reviews.freebsd.org/D38283MFC after: 1 week
netlink: allow creating sockets with SOCK_DGRAM.Some existing applications setup Netlink socket withSOCK_DGRAM instead of SOCK_RAW. Update the manpage to clarifythat the default way of creating t
netlink: allow creating sockets with SOCK_DGRAM.Some existing applications setup Netlink socket withSOCK_DGRAM instead of SOCK_RAW. Update the manpage to clarifythat the default way of creating the socket should be withSOCK_RAW. Update the code to support both SOCK_RAW and SOCK_DGRAM.Reviewed By: pauammaDifferential Revision: https://reviews.freebsd.org/D38075
netlink: fix compatibility with older netlink applications.Some apps try to provide only the non-zero part of the required message header instead of the full one. It happens when fetching routes o
netlink: fix compatibility with older netlink applications.Some apps try to provide only the non-zero part of the required message header instead of the full one. It happens when fetching routes or interface addresses, where the first header byte is the family.This behavior is "illegal" under the "strict" Netlink socket option, however there are many applications out there doing things in the "old" way.Support this usecase by copying the provided bytes into the temporary zero-filled header and running the parser on this header instead.Reported by: Goran Mekić <meka@tilda.center>
testing: fix skipping netlink tests if netlink module is not loaded.
netlink: improve RTM_GETADDR handling.* Allow filtering by ifa_family & ifa_index.* Add common RTM_<NEW|DEL|GET>ADDR parser* Add tests verifying RTM_GETADDR filtering behaviour & output* Factor
netlink: improve RTM_GETADDR handling.* Allow filtering by ifa_family & ifa_index.* Add common RTM_<NEW|DEL|GET>ADDR parser* Add tests verifying RTM_GETADDR filtering behaviour & output* Factor out common netlink socket test methods into NetlinkTestTemplate* Add NLMSG_DONE message handlerReviewed By: pauammaDifferential Revision: https://reviews.freebsd.org/D37970
netlink: add snl(3) - simple netlink libraryReviewed by: bapt, pauammaDifferential Revision: https://reviews.freebsd.org/D37736
netlink: connect netlink tests to the buildReviewed By: ngieDifferential Revision: https://reviews.freebsd.org/D37708
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 themessage* Don't use multipart RTM_GETLINK replies when searching for thespecific interface names* Use ENODEV instead of ENOENT in case of failed RTM_GETLINK search* Add python netlink test helpers* Add some netlink interface testsDifferential Revision: https://reviews.freebsd.org/D37668
12