From nobody Sat Oct 01 16:35:10 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mft4L4bGGz4cyRd for ; Sat, 1 Oct 2022 16:35:14 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mft4K1WPFz42G7 for ; Sat, 1 Oct 2022 16:35:13 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x72d.google.com with SMTP id c19so4542202qkm.7 for ; Sat, 01 Oct 2022 09:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=ARQYCZ6Rl5pIJ+V9Niery36zCLGjwgXgVjcwT6fh9+I=; b=aGT6y5VxAmyHwjRNe4p8laJOcUl7NnUL/xGctcGLXsN5F89v4eLDNjwXm3cORDlZum lVML7/bTXoRROV28RsBNKGmhHOp9xwXK/DsP5H5UKV6obLYW6Kyb1zlqpOxS/d1J11Zf 1+aqmnBWzXVIR4PaOApN0Pc/3ga3UKow21ktXACmaMhDUifsNzYxnIgiKlh9TTEDp9jt tWVtZB0WFkd38MWvPfKVbX6cNe0nnxlnTAI8gwvKfmPkkYggbRbmDBHnDNTa5UWwi/Dq 6/1ifoF4NzbGmdU98uUsjdxhRFl4VjpjHciGwkeCg64idYI7uPjRUEuQpoXkUcHFOtiG OKXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=ARQYCZ6Rl5pIJ+V9Niery36zCLGjwgXgVjcwT6fh9+I=; b=Gwo2/Se1YYnWBEwFZx7Xs6TNG+Yo0rqv7dnhX0noO6ECGtvK2xAaP/pOgEn+LhLf+G 7ZffK0HG4LNUNMtIxX+SAuAHe20JPSlaNzbidsXkSINqfg5pZZYC/hC839AVugm8jhUi 61zbNBwZsHv4wnsDknqIvnoYJKYV2q6sUqZ8B27BjkbA0r5CTvmLoh3jpALLygTjWyj/ CVKwZKpgra2qd3yxWwdTt7or/yhUJTiRT+fjGospyXM3uas8HKn2/0heAwwTHqGMQJqD fmZCnMYe/reiXGVVebhXzUmCrDSlbED+r6D5Lxm+Msg8wIxMIrBkMRcAHXEIcgJSkEBz vr1Q== X-Gm-Message-State: ACrzQf3j8k0EqUAEFmtNoCR7CjbjXLEx2oDR214Qb9AV459MITwdhjAo xOCdUptTbtSeKeImlCB3nqMb8kAQ4bGbJg== X-Google-Smtp-Source: AMsMyM6pNIrVVnL9a3elCJPy89Cu/4CwiQw745cYhNz5iK8yMpBShAptg0uqHetYQkU1UG2Y9b3Z6Q== X-Received: by 2002:a05:620a:408e:b0:6cb:b4d2:a3bb with SMTP id f14-20020a05620a408e00b006cbb4d2a3bbmr9769120qko.110.1664642112388; Sat, 01 Oct 2022 09:35:12 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-219-215.bltmmd.fios.verizon.net. [100.16.219.215]) by smtp.gmail.com with ESMTPSA id k9-20020a05620a414900b006ce441816e0sm6482455qko.15.2022.10.01.09.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Oct 2022 09:35:11 -0700 (PDT) Date: Sat, 1 Oct 2022 12:35:10 -0400 From: Shawn Webb To: "Alexander V. Chernikov" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 7e5bf68495cc - main - netlink: add netlink support Message-ID: <20221001163510.gkvfycmi224ei5ok@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202210011419.291EJ3aa000309@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ka3ftvtuwtnmwgja" Content-Disposition: inline In-Reply-To: <202210011419.291EJ3aa000309@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Mft4K1WPFz42G7 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=aGT6y5Vx; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::72d as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-5.10 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from]; RCPT_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[hardenedbsd.org]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --ka3ftvtuwtnmwgja Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 01, 2022 at 02:19:03PM +0000, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D7e5bf68495cc0a8c9793a338a8= a02009a7f6dbb6 >=20 > commit 7e5bf68495cc0a8c9793a338a8a02009a7f6dbb6 > Author: Alexander V. Chernikov > AuthorDate: 2022-01-20 21:39:21 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2022-10-01 14:15:35 +0000 >=20 > netlink: add netlink support > =20 > Netlinks is a communication protocol currently used in Linux kernel t= o modify, > read and subscribe for nearly all networking state. Interfaces, addr= esses, routes, > firewall, fibs, vnets, etc are controlled via netlink. > It is async, TLV-based protocol, providing 1-1 and 1-many communicati= ons. > =20 > 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 > =20 > The implementation also supports the NETLINK_GENERIC family framework. > =20 > Implementation notes: > Netlink is implemented via loadable/unloadable kernel module, > not touching many kernel parts. > Each netlink socket uses dedicated taskqueue to support async operati= ons > that can sleep, such as interface creation. All message processing is > performed within these taskqueues. > =20 > Compatibility: > Most of the Netlink data models specified above maps to FreeBSD conce= pts > 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. > =20 > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D36002 > MFC after: 2 months > --- > etc/mtree/BSD.include.dist | 4 + > sys/modules/Makefile | 1 + > sys/modules/netlink/Makefile | 17 + > sys/net/route.c | 11 + > sys/net/route/route_ctl.h | 7 + > sys/net/rtsock.c | 42 ++ > sys/netlink/netlink.h | 257 +++++++++ > sys/netlink/netlink_ctl.h | 102 ++++ > sys/netlink/netlink_debug.h | 82 +++ > sys/netlink/netlink_domain.c | 689 +++++++++++++++++++++++ > sys/netlink/netlink_generic.c | 472 ++++++++++++++++ > sys/netlink/netlink_generic.h | 112 ++++ > sys/netlink/netlink_io.c | 528 ++++++++++++++++++ > sys/netlink/netlink_linux.h | 54 ++ > sys/netlink/netlink_message_parser.c | 472 ++++++++++++++++ > sys/netlink/netlink_message_parser.h | 270 +++++++++ > sys/netlink/netlink_message_writer.c | 686 +++++++++++++++++++++++ > sys/netlink/netlink_message_writer.h | 250 +++++++++ > sys/netlink/netlink_module.c | 228 ++++++++ > sys/netlink/netlink_route.c | 135 +++++ > sys/netlink/netlink_route.h | 43 ++ > sys/netlink/netlink_var.h | 142 +++++ > sys/netlink/route/common.h | 213 ++++++++ > sys/netlink/route/iface.c | 857 +++++++++++++++++++++++++++++ > sys/netlink/route/iface_drivers.c | 165 ++++++ > sys/netlink/route/ifaddrs.h | 90 +++ > sys/netlink/route/interface.h | 245 +++++++++ > sys/netlink/route/neigh.c | 571 +++++++++++++++++++ > sys/netlink/route/neigh.h | 105 ++++ > sys/netlink/route/nexthop.c | 1000 ++++++++++++++++++++++++++++= ++++++ > sys/netlink/route/nexthop.h | 102 ++++ > sys/netlink/route/route.c | 972 ++++++++++++++++++++++++++++= +++++ > sys/netlink/route/route.h | 366 +++++++++++++ > sys/netlink/route/route_var.h | 101 ++++ > 34 files changed, 9391 insertions(+) >=20 Hey Alexander, This commit broke buildworld: =3D=3D=3D> tests/atf_python/sys/net (includes) =3D=3D=3D> etc (includes) make[3]: warning: /etc: Permission denied. =3D=3D=3D> etc/termcap (includes) =3D=3D=3D> etc/sendmail (includes) 53.93 real 36.66 user 11.99 sys cd /usr/src; time env MACHINE_ARCH=3Damd64 MACHINE=3Damd64 CPUTYPE=3D CC= =3D"cc -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd6= 4.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CXX=3D"c++ -target= x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp -B= /usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CPP=3D"cpp -target x86_64-unknow= n-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/s= rc/amd64.amd64/tmp/usr/bin" AS=3D"as" AR=3D"ar" LD=3D"ld" LLVM_LINK=3D"" = NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SIZE=3D"size" STRI= PBIN=3D"strip" INSTALL=3D"install -U" PATH=3D/usr/obj/usr/src/amd64.amd64= /tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.a= md64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/= usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/leg= acy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/us= r/sbin:/usr/bin SYSROOT=3D/usr/obj/usr/src/amd64.amd64/tmp make -f Makefi= le.inc1 BWPHASE=3Dincludes DESTDIR=3D/usr/obj/usr/src/amd64.amd64/tmp tes= t-includes cd /usr/src/tools/build/test-includes; MACHINE_ARCH=3Damd64 MACHINE=3Damd= 64 CPUTYPE=3D CC=3D"cc -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr= /obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -ta= rget x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tm= p -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CXX=3D"c++ -target x86_64-un= known-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/u= sr/src/amd64.amd64/tmp/usr/bin -target x86_64-unknown-freebsd14.0 --sysroo= t=3D/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr= /bin" CPP=3D"cpp -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/u= sr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -target x= 86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp -B/u= sr/obj/usr/src/amd64.amd64/tmp/usr/bin" AS=3D"as" AR=3D"ar" LD=3D"ld" LLVM= _LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SIZE= =3D"size" STRIPBIN=3D"strip" INSTALL=3D"install -U" PATH=3D/usr/obj/usr/s= rc/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/u= sr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/= sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64= =2Eamd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec= ::/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr= /sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64= /tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/o= bj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/lega= cy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin SYSROOT=3D/usr/obj/usr/src/a= md64.amd64/tmp make DESTDIR=3D/usr/obj/usr/src/amd64.amd64/tmp test-includ= es cc -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -target x86_64-unknown-f= reebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/= amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common -DHARDENEDBSD -g -gz=3Dzli= b -mretpoline -flto -MD -MF.depend.netlink_netlink.o -MTnetlink_netlink.o = -std=3Dgnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-head= ers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototy= pes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-= strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts= -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wmissing-variab= le-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-u= nused-const-variable -Wno-error=3Dunused-but-set-variable -Qunused-argumen= ts -c netlink_netlink.c -o netlink_netlink.o netlink_netlink.c:1:10: fatal error: 'netlink/netlink.h' file not found #include ^~~~~~~~~~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[3]: stopped in /usr/src/tools/build/test-includes *** Error code 1 Stop. make[2]: stopped in /usr/src Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --ka3ftvtuwtnmwgja Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmM4bDgACgkQ/y5nonf4 4frFbA//WyAmdWMN20sgxwPU+laHHUb0Q4vZftLIVsu1/rOLIISOrqgzutvTaOyy /ln7eF1KgOYvAO3Itf8aks7YdfI1vsaeubzfFttCp1soucjhDUU3M0OX9US/xyQk Df3HWYkTBDXvDNxrkMNDyV9rw5uLy8OwNda8GXmLEj14N4ZWZudkhq9QUb0p5PqB GvMwFazcwDHAoVqnuqmdQx4GgAdUfzqE1IpPNwJZ0Aw/iNviaEEDWZCeQkPDE4pB eChGOuGbF54Yy5Q9bRY7NgzlDxCFZhO0JPe8E8rkt0jmKRaWWSA+nPoUR2NW/m3A DEnoHNR8OGUZlvphF5gqiJjWpog0z66yC0MuzpTJYuM7YQ2/aQkX8W8HeKJHyQF+ h2dOuSsizUM+p3ugXCHe7r6dpZ/VeLwtcTlhOrb9hKrY5QLxq+xb8MvxLQNAnuze k7Z6OTNKUwQ69PKPLLuNeTSr25A1P7hwGoIomcZRT8yheg4vPgFD4Foa+H5oc8XX phAZ0eNLshNYiuIQ0Mt+MmXP6CFIiVo4PselMgauj/fxmTvCBIAJt52LKZxTBaLu RIiIId4eLQJtet/mAaCihdAKgObDSpBnKkV3r97FZNoyobRqhdfY9zk857hhPL2B nz3BhoIbLHTVlItheQptfqfgUnTU+AgK8+MBQ/Z2noDYI1yFM24= =t1G0 -----END PGP SIGNATURE----- --ka3ftvtuwtnmwgja--