netlink: group rt, genl and channel under a netlink namespace - #623
Merged
Conversation
lneto
force-pushed
the
claude_netlink_ns
branch
4 times, most recently
from
July 4, 2026 18:57
bafe650 to
828eda8
Compare
lneto
force-pushed
the
claude_netlink_ns
branch
5 times, most recently
from
July 26, 2026 12:05
4efe0f0 to
cb98f83
Compare
Constructing a netlink session read as an anonymous call on the required class
(require("netlink.rt")()), inconsistent with socket.inet's inet.tcp(). Make
netlink a namespace like socket.inet: require("netlink") returns a table whose
netlink.rt(), netlink.genl() and netlink.channel(name) are the factories,
mirroring inet.tcp()/inet.udp().
The channel C module now registers as netlink.channel (luaopen_netlink_channel),
and the netlink Lua aggregator re-exports it plus rt and genl.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Constructing a netlink session read as an anonymous call on the required class —
require("netlink.rt")()— inconsistent withsocket.inet'sinet.tcp(). This makes netlink a namespace likesocket.inet:require("netlink")now returns a table whosenetlink.rt(),netlink.genl()andnetlink.channel(name)are the factories, mirroringinet.tcp()/inet.udp(). The aggregator requires the three members eagerly; loadingrt/genlonly defines the classes (constructing a session is what needs a sleepable runtime), so a softirq runtime that only wantsnetlink.channelrequiresnetlinkall the same — the channel test exercises exactly that.How
netlink.channel(luaopen_netlink_channel); verified in-kernel that the dotted C module name resolves. The source stayslib/luanetlink.cand the kernel module staysluanetlink.ko.lib/netlink.lua) re-exportschannel,rt,genl.Channel callers (
require("netlink").channel(name)) are unchanged. Full socket and netlink suites pass; LDoc builds clean.Supersedes #622 (the
.newapproach): keeps everything callable and consistent withinet.tcp(), which is what the redesign was after.Open branches (
nl80211#617,netfailover#618,floodguard#619) rebase onto this.🤖 Generated with Claude Code