Skip to content

Make current CAPABs the baseline (keep CAPAB negotiation), remove DKEY - #268

Open
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1791944746-remove-capab
Open

devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1791944746-remove-capab

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Summary

All DALnet servers run current bahamut, so the capabilities that used to be negotiated are now the baseline. The code no longer has a separate "peer lacks X" path for them. The CAPAB command itself stays, so new server-to-server capabilities can still be negotiated later.

  • BURST, UNCONNECT, NICKIPSTR, NOQUIT → always on. The legacy send paths are gone: sendto_server_butone_nickipstr, sendto_non_noquit_servs_butone, the non-NICKIPSTR NICK/TOPIC formats, the non-UNCONNECT SQUIT path, and the IsBurst checks.
  • ZIP → controlled only by the connect block Z flag (DoZipThis). The IsZipCapable handshake is gone.
  • TLS → unchanged. It is set at the socket level by the connect/port S flag.
  • DKEY (Diffie-Hellman/RC4) → removed: m_dkey, the DKEY command, and connect flag E. dh.c/rc4.c are now dead code and can be deleted in a follow-up.

CAPAB stays as the extension point:

  • send_capab() (in s_serv.c) is sent before SERVER on both outbound (completed_connection) and inbound (m_server_estab) links. It builds the line from servcapabs[]. Today it still sends CAPAB SSJOIN NOQUIT BURST UNCONNECT ZIP NICKIP NICKIPSTR TSMODE, so the wire format is unchanged and older peers still enable their BURST/NICKIPSTR paths.
  • m_capab() sets a bit only for servcapabs[] rows with a non-zero flag. Baseline rows have flag 0, and unknown tokens are ignored.
  • How to add a future capability:
    /* struct.h */   #define CAPAB_FOO 0x0008
    /* s_serv.c */   { "FOO", CAPAB_FOO },          /* in servcapabs[] */
    /* behavior */   if (IsServCapab(cptr, CAPAB_FOO)) ...
                     sendto_capab_serv_butone(one, CAPAB_FOO, 0, ...);
    sendto_capab_serv_butone is kept for this.

Behavior change: a connect {} block that still has flag E now fails to parse that flag. Remove E from configs before upgrading.

Testing

  • Build: same warning count as master (15).
  • tools/testnet (Add tools/testnet: local linked-network test kit with link and CAP tests #270), 3 linked servers, plain+zip and TLS+zip links: all link tests pass with the new build everywhere, with an unmodified master ircd as leaf1, and with master as the hub.
  • Wire check: a fake server linked to the hub with CAPAB ... FUTURECAP. The hub replied CAPAB SSJOIN NOQUIT BURST UNCONNECT ZIP NICKIP NICKIPSTR TSMODE before SERVER and ignored the unknown token.

Link to Devin session: https://app.devin.ai/sessions/9c171b7fd3d341178646e3cce156ddd7
Open in Devin Desktop: https://app.devin.ai/desktop/session/9c171b7fd3d341178646e3cce156ddd7?variant=devin
Requested by: @eaescob

Servers no longer send or parse CAPAB. Every link is treated as
BURST, UNCONNECT and NICKIPSTR capable (and NOQUIT when compiled in);
ZIP output is still controlled by the connect block Z flag. TLS links
remain configured with the S flag. Diffie-Hellman link negotiation
(DKEY, connect flag E) could only be enabled through CAPAB and is
removed.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Servers send CAPAB again and m_capab() parses it, so new server-to-server
capabilities can be negotiated later. The existing capabilities (SSJOIN
NOQUIT BURST UNCONNECT ZIP NICKIP NICKIPSTR TSMODE) are advertised but
always assumed. A future capability is a CAPAB_ bit plus a servcapabs[]
row, gated with IsServCapab()/sendto_capab_serv_butone().

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title Remove CAPAB and DKEY negotiation; assume all server capabilities Make current CAPABs the baseline (keep CAPAB negotiation), remove DKEY Oct 28, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

devin-ai-integration Bot added a commit that referenced this pull request Oct 28, 2026
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant