Repository navigation
Releases
go-ethernetip v0.8.3
Date: 2026-11-16
Previous release: v0.8.2
Summary
A patch release on v0.8.2. No exported identifier is added, removed or
changed.
Changes
Fixes
- scanner:
OpenreportsErrNotConnectedwhen the client's session
ends between the Forward_Open reply and the opening of the I/O
connection. It returnedErrInvalidOption("production without an
interval or destination"), an error about the configuration, for what
is a lost connection: the target's address, taken from the session, was
gone. The Forward_Close is still tried, as on the other failures after
a Forward_Open. The chaos test ofe2emet this as a connection killed
at that moment.
Tests
TestOpenSessionEndedAfterForwardOpen: a session that has ended after
the reply givesErrNotConnected, notErrInvalidOption, and one
Forward_Close request.
go-ethernetip v0.8.2
Date: 2026-11-16
Previous release: v0.8.1
Summary
A patch release on v0.8.1 that moves the interop suite to
ethernetip-interop v0.8.2. No library change: no exported identifier is
added, removed or changed.
Changes
Tests
- The interop suite is tested against ethernetip-interop v0.8.2: cB-Sigma's
enip v0.2.1 (fixes cB-Sigma/enip#1–#8), EIPScanner's adapter with the
configuration instance segment always in the Class 1 path, OpENer master
v2.3-592 (fb90c99), pylogix 1.1.7 and new base images; all thirteen
images pinned by their new digests. - Run: 221 pass, 0 fail, 160 N/A, 2 skipped, as with v0.8.1; every
reference passes the same cases. - The cB-Sigma Class 1 I/O case (its originator against go-ethernetip's
target) stays N/A: enip v0.2.1 sends no Forward_Close for an I/O
connection; fixed upstream after v0.2.1 (cB-Sigma/enip#9).
go-ethernetip v0.8.1
Date: 2026-11-15
Previous release: v0.8.0
Summary
A patch release on v0.8.0. No exported identifier is added, removed or
changed.
Changes
Fixes
- eds:
GenerateGowritesGenerateOptions.Sourceinto the header
comment as the other text of an EDS file is written into comments:
control characters, invalid UTF-8 and the byte order mark become spaces.
A source name with a line break made the header end early, so the
output did not format (an error) or held the rest of the name as code.
The header is now always the first line.
Tests
TestGenerateSourceKeepsHeaderOneLine: source names with LF, CR LF,
an escape sequence, U+2028, a backtick, invalid UTF-8 and*/give a
one-line header and the same file after it as a plain name.
go-ethernetip v0.8.0
Date: 2026-11-14
Previous release: v0.7.1
Summary
A minor release on v0.7.1. Application code the library calls (a handler,
a callback, a metrics hook, a state handler) that does not return normally
is stopped at the library's boundary and logged at Error level with its
stack, and the process keeps running; a request whose handler it was is
answered with general status 0x10. implicit.Config.Produce, OnData,
OnInput and the server's request handlers may call Close of the
object that calls them; a Close on another goroutine still waits for
them. New IOConfig fields and Logix client options
lower, raise or disable the scanner's floors on the O->T actual packet
interval and the bounds of ListTags and Template; their defaults are
the values of v0.7.1. No exported identifier is removed or changed.
Changes
Breaking
- all packages: application code that does not return normally is
logged at Error level ("application code did not return normally", with
the fieldscallback,valueandstack), and the library goes on:- server: the request of a handler (
Object.ServeCIP,
SymbolHandler.ServeSymbol, aServiceFunc, anAttributefunction,
the reset handler,Assembly.OnWritefor Set_Attribute_Single,
logix.TagServer.OnWrite) is answered with 0x10 (device state
conflict), within a Multiple Service Packet that service only, and the
session goes on. A Forward_Open whose configuration data's
Assembly.OnWritedoes not return normally is refused with 0x10 and
opens no connection; the data stays written. For I/O data, the
connection goes on. - implicit: a
Producecall sends nothing at that interval; after
OnDatathe endpoint goes on with the next datagram; afterOnTimeout
the connection is closed, as after any timeout. - scanner: after
OnInputthe connection goes on; afterOnState
the state change stands. - client: after the state handler the state change stands.
- metrics: after a hook of the client, the server or an I/O
endpoint, what the library sends and answers does not change.
- server: the request of a handler (
Fixes
- implicit, scanner, server:
Closecalled from a callback that runs
on a goroutine it waits for returns:Connection.Closeand
Endpoint.ClosefromProduce,Endpoint.ClosefromOnData,
Scanner.Closewith the scanner's own endpoint fromOnInput,
Server.Closefrom a request's handler. In v0.7.1 these calls did not
return. Such aClosedoes not wait for the goroutine it is called on,
which ends when the callback returns, and waits for every other one, as
aCloseon another goroutine does. What aProducecall that called
Closereturns is not sent. The goroutines that run these callbacks
record their identifier when they start (internal/goid), andClose
compares it with the goroutine it runs on.
Additions
- scanner:
IOConfig.OTAPIDivisorandIOConfig.MinOTAPIset the two
floors on the O->T actual packet interval of a Forward_Open reply: the
O->T RPI divided byOTAPIDivisor(default 4), andMinOTAPI(default
100 µs, or the RPI when that is shorter). Zero keeps the default, a
positive value replaces it and a negative value disables that floor; an
O->T interval of 0 is refused in any case. - logix:
WithMaxTagListReplies,WithMaxTagListDataand
WithMaxTemplateRepliesset the bounds ofListTags(65536 replies,
16 MiB of them) andTemplate(65536 Read Template replies for one
definition); a value below 1 keeps the default.
Tests
- One test per call site of application code that does not return
normally, in thecallbacks_test.goofserver,implicit,scanner
andclient, inlogix/tagserver_test.goand ininternal/callback
(TESTING.md lists them). - Row L10 of the lifecycle matrix:
TestCloseFromProduceAndOnData,
TestOnInputCallsScannerCloseandTestHandlerCallsClose; and that
aCloseon another goroutine, or from a callback for the other
goroutines, waits for a callback in progress:TestCloseWaitsForCallback
(implicit),TestScannerCloseWaitsForOnInput,TestCloseWaitsForHandler
(server), withtestenv.Blocking, which observes theClosewaiting.
internal/goidhas its own tests. - Boundary tables for the new fields and options:
TestOTAPIFloor,
TestReplyAPIFloors,TestListAndTemplateBoundDefaults,
TestListTagsRepliesOption,TestListTagsDataOption,
TestTemplateRepliesOption. The defaults stay those of v0.7.1
(TestMinOTAPI,TestReplyAPIs,TestListTagsReplyLimit,
TestTemplateReplyLimit). - client:
TestConnWriteFailureBoundedByContextends the request by
its context in every run, andTestConnWriteFailureAfterRequestTaken
covers a failed write whose request is no longer the connection's
pending one: both sides of that branch ofConn.doare covered. - server:
TestDelayedDiscoveryBoundfailed in one run in about
1000: the delay of a ListIdentity reply is drawn at random up to the
maximum the request asks for, and a draw of zero is answered at once,
outside the bound the test checks. The test now sets the server's
generator so that its requests draw a delay. - TESTING.md gives the figure of
BenchmarkConsumefor v0.8.0.
Documentation
- The doc comments of the callbacks, of the
Closemethods and of the new
fields and options. - API.md, ARCHITECTURE.md (the goroutines
Closewaits for,
internal/callbackandinternal/goid), ERRORS.md (the 0x10 answers),
OBSERVABILITY.md (the Error entry), SECURITY.md, TESTING.md,
docs/LIMITATIONS.md, docs/IMPLICIT.md, docs/LOGIX.md, docs/OBJECTS.md,
docs/api.
go-ethernetip v0.7.1
Date: 2026-11-14
Previous release: v0.7.0
Summary
A patch release on v0.7.0. The scanner also refuses a Forward_Open reply
whose O->T connection ID is 0; Close works from OnState callbacks,
with requests in flight and while Open waits for its reply; reopen
delays have equal jitter. The server's inactivity timeout set to 0 at run
time holds for open sessions, and the EDS parser bounds sections and
fields. TESTING.md gains the lifecycle contract matrix, with leak checks,
allocation-budget tests and fuzz targets. No exported identifier changes.
Changes
Fixes
- server: an inactivity timeout set to 0 at run time (TCP/IP Interface
attribute 13) clears the read deadline of the open sessions; "zero
disables it" now holds for them too. - scanner: a Forward_Open reply whose O->T connection ID is 0 is
refused withErrProtocol, and the connection is closed at the target
with Forward_Close, as for the actual packet intervals v0.7.0 checks. - scanner: an
OnStatehandler may callIO.Closeor
Scanner.Close, withReconnectset too, and the call returns. The
documentation ofOnStatestates the goroutine it runs on and what it
may call; once an IO is closed, its own goroutines report no further
state. - scanner: the reopen delays of
Reconnecthave equal jitter: each
wait is drawn from [d/2, d], d doubling fromMinDelayup toMaxDelay
without wrapping, the first d at mostMaxDelay. - scanner: a
Scanner.ClosewhileOpenwaits for the Forward_Open
reply leaves nothing running:Opencloses what it opened and returns
ErrClosed. Of concurrentIO.Closecalls, one closes the connection. - client:
Conn.Closefails the request in flight on the connection
withErrClosedat once (it ended withErrTimeoutafter the client's
timeout), and a request whose write fails returns within its context.
A request in flight whenClient.Closeruns fails withErrClosed, as
Closedocuments, also when its write fails during the close. - client: a
Dialerthat returns neither a connection nor an error
failsConnectwithErrConnectFailed. - eds:
Parserefuses a file of more than 16384 sections or 1048576
fields in all, in addition to the limits on size, entries and fields per
entry; the files ineds/testdatause well under a hundredth of each.
Tests
- TESTING.md "Lifecycle contracts": rows L1 to L16 for the client, its
connections, the server, the scanner, its I/O connections, the I/O
endpoint and its connections, with tests for concurrentClose,
Closeduring a read and during a write, callbacks that call methods
andClose, andOpenracingClose. - Goroutine leak checks after the tests of
client,server,implicit
andscanner(internal/testenv). - Allocation-budget tests for the decoders of
cip,encapand
implicit, foreds.Parseat its limits and for the server's handling
of requests whose reply exceeds its budget. What a call allocates is
averaged over many calls, astesting.AllocsPerRuncounts, with no
other goroutine of the module running, against a budget derived from
what the code must hold. - Fuzz targets for
cip.DecodeForwardOpenReply,DecodeForwardCloseReply
andDecodeConnectionFailure;make fuzzruns every fuzz target it
finds. BenchmarkConsumefeeds datagrams that are each newer than the last,
so that it measures the receive path up to the callback; TESTING.md
gives its new figure and the machine it was measured on.- Nightly,
fuzz.ymlruns the tests ofcip,encap,implicit,
logixandedswithGOARCH=386.
Documentation
- The lifetime of the data passed to
Attribute.Set,ServiceFunc,
Object.ServeCIPandSymbolHandler: valid until the call returns. WithInactivityTimeoutsays that attribute 13 changes it at run time;
Client.Closesays that it waits for a write in progress, at most the
client's timeout.- TESTING.md, SECURITY.md, docs/LIMITATIONS.md, docs/IMPLICIT.md,
docs/EDS.md, ARCHITECTURE.md (the fuzz targets are those TESTING.md
lists), docs/FEATURE-STATUS.md, docs/api.
go-ethernetip v0.7.0
Date: 2026-11-14
Previous release: v0.6.0
Summary
Tighter bounds and lifecycles in the server, the scanner, the Logix client
and emulation, and the EDS package. The server frees the place of a
connection whose TLS handshake fails, stops building a reply as soon as it
exceeds what the packet or connection can carry, and no longer leaves a
multicast producer running when a Forward_Close arrives during the
Forward_Open. The scanner checks the actual packet intervals of a
Forward_Open reply. The Logix client bounds the tag list and template
reads like the fragmented read. EDS files with several spellings of one
number give one entry, and Validate runs in linear time. The public API is
unchanged.
Changes
Fixes
- server: a connection whose TLS handshake fails frees its place under
the TCP connection limit (2 ×WithMaxSessions+ 16); before, it held it
untilClose. - server: Multiple Service Packet, Get_Attribute_List and
Get_Attributes_All stop with 0x11 (reply data too large) as soon as the
reply exceeds what the encapsulation packet or the Class 3 connection can
carry, instead of building the whole reply first. Replies that fit are
unchanged. - server: a Forward_Close that arrives while a multicast Forward_Open
is handled no longer leaves a multicast producer running (the
Forward_Open is answered 0x31C); the change-of-state producer set is
updated together with the connection's close. - server: a connection opened while the server closes is refused
(0x31C), and the Class 3 inactivity timer always stops with its
connection. - server: delayed ListIdentity replies (
WithDiscoveryDelay) still
waiting atCloseare dropped; none is sent afterClosereturns. - implicit:
Endpoint.Closealso closes connections that only
produce, as documented. - scanner:
Openrefuses a Forward_Open reply with a T->O actual
packet interval of 0 or an O->T actual packet interval below a quarter of
the requested RPI (and below 100 µs), withErrProtocol, and closes that
connection again. - scanner: O->T data of a point-to-point connection goes to the
target's address, at the port named in the Sockaddr Info O->T item;
another address in that item is ignored. - logix:
Client.ListTagsstops withErrProtocolafter 65536 partial
replies or 16 MiB of reply data, like a fragmented read;
Client.Templatestops after 65536 Read_Template replies. - logix:
TagServercompares BOOL array indices as 32-bit values, so
indices of 0x80000000 and above are answered with "access beyond end" on
32-bit platforms too. - logix:
TagServeranswers Read-Modify-Write on an array member of no
elements with "access beyond end" instead of reading beyond the tag, and
a Template Get_Attribute_List whose reply exceeds the reply size with
0x11. - logix:
TagServer.AddTagandAddStructTagcompute tag sizes without
integer overflow and refuse tags above 16 MiB on every platform. - logix: template decoding refuses structure members above 2 GiB;
template definitions are parsed without splitting the data after the
member names. - eds: keywords that name the same number (
Param1andParam01, or a
repeatedParam1) give one parameter, enum, assembly or connection: the
first.GenerateGooutput no longer grows with such copies, and
Validatereports them as errors. - eds:
Validatelooks up entries through a per-section index, so its
run time is linear in the number of assemblies, connections and
references.
Tests
- New regression tests in server (TLS handshake failures, reply budgets,
Forward_Close during a multicast Forward_Open, opening while closing,
delayed discovery at Close), implicit (Endpoint.Closeof producers),
scanner (reply intervals, Sockaddr O->T address), logix (tag list and
template reply limits, BOOL array indices, tag sizes) and eds (numbered
entries, many assemblies).
Documentation
- SECURITY.md, docs/LIMITATIONS.md and docs/IMPLICIT.md describe the new
bounds and the scanner's handling of actual packet intervals;
ARCHITECTURE.md gives the Multiple Service Packet limit as 1000 embedded
services, as the code has it.
go-ethernetip v0.6.0
Date: 2026-11-08
Previous release: v0.5.2
Summary
go-ethernetip is now tested against recorded traffic of real Rockwell
devices: a 1756-L63/A ControlLogix (firmware 15.4) behind its EtherNet/IP
module with RSLinx, RSLogix 5000 and FactoryTalk; a 1756-ENBT/A (4.3); a
Micro850 2080-LC50-48QBB (12.11); a MicroLogix 1400; and unidentified
targets — 20 committed captures, about 200,000 EtherNet/IP messages
(testdata/captures). Every message decodes
and encodes back byte for byte; the client and the Logix client run
against the recorded replies with the recorded originators' requests; the
server and the Logix emulation answer every recorded request they support
as the devices did. The recordings showed three differences, fixed here.
This is evidence from real devices recorded by others, not a conformance
claim.
Changes
Fixes
- logix:
Client.Templateasks Read Template for attribute 4 × 4 − 20
octets, as RSLogix 5000 asks the 1756-L63 for its COUNTER (30 words, 100
octets) and TIMER (24 words, 76 octets) templates, which the controller
answers in full. It asked for × 4 − 23: against that controller the last
3 octets of the definition, the end of the last member's name, were not
read ("U" for "UN", "D" for "DN"). Servers that hold less (the emulation)
answer the rest, as before. - logix: the emulation stores a written BOOL as 0 or 1: a Write Tag of
0xFF reads back as 1, as on the recorded Micro850 (16 write-then-read
sequences); it read back 0xFF. - server: the SendRRData reply carries the request's timeout, as the
recorded ControlLogix module (32 s, 0 s) and the four Logix-like targets
(20 s) answer; it was 0. (The Micro850 and the MicroLogix answer a
constant, 5 and 1024; originators ignore the field.)
Tests
internal/capture: a pcap/pcapng reader with TCP reassembly
(retransmissions, gaps, mid-stream starts, segments whose first copy was
not captured), encapsulation framing, UDP 44818 and 2222, request/reply
pairing by context and sequence count; its counts equal Wireshark 4.6's.testdata/captures: 20 captures committed byte-identical under the
names<client-or-peer>_<device>_<operation>(original names, URLs,
revisions and stated terms inmanifest.json), with evidence classes A
to D,coverage.json(what each exchange verifies) andSHA256SUMS.encap,cip,implicit: every recorded message decodes and encodes
back (the MicroLogix originator's non-zero reserved Forward_Open octets
are encoded as zeros); truncations and malformed variants are refused.
client: replay against the 1756-L63 (session, ListServices,
ListInterfaces, routed Identity, Class 3 with RSLinx's parameters), the
1756-ENBT/A's ListIdentity, a Class 1 Forward_Open with Sockaddr Info,
and a Class 3 connection to the Micro850.logix: the 1756-L63's
templates;WriteBitbyte for byte as the recorded HMI; the Micro850's
Read Tag and Write Tag through the client and the emulation.server:
replay with pinned differences; 300 seeded mutated streams of recorded
requests.- Fuzz seeds of recorded messages for 16 fuzz targets.
Known differences (pinned, not changed)
- The server answers command 0x0001 with "invalid command", the Identity
attributes 0x65/0x66 with 0x14, and lists its own classes and two more
attributes for the Message Router's Get_Attributes_All; it does not hold
the Rockwell-private and Micro800 objects or PCCC. Its ListServices
announces UDP (the Micro850 does not). The emulation's template
definitions keep the ";n…" suffix that firmware 15.4 omits;
Get_Attributes_All of a template is not implemented.
Documentation
- testdata/captures/README.md; TESTING.md, INTEROPERABILITY.md (recorded
traffic), docs/LIMITATIONS.md, docs/FEATURE-STATUS.md, docs/LOGIX.md,
THIRD_PARTY_NOTICES.md, README.md, AGENTS.md.
go-ethernetip v0.5.2
Date: 2026-11-06
Previous release: v0.5.1
Summary
Qualified against thirteen independent implementations: the interop suite
pins otfabric/ethernetip-interop v0.8.1, which adds cB-Sigma's enip v0.2.0.
No library change.
Changes
- interop: the images of ethernetip-interop v0.8.1, pinned by digest.
cB-Sigma's enip is a generic client and server: its originator against
go-ethernetip's target, and go-ethernetip's originator against its
Logix-style target with thelogixandlogix-structuresfixtures. Its
scanner sends no Forward_Close, so its Class 1 case is a recorded limit. - interop: a new case, "Logix tag list with templates (0x6C)": against a
target that serves templates (cB-Sigma's), each structure tag's type is
named after its template, read withlogix.Client.Template. The interop
node'stag-listreports types that way: the element type, and a
structure's template name instead ofstruct 0x100. - Docs: README (thirteen references, cB-Sigma's enip in the comparison),
INTEROPERABILITY.md (matrix of the run, cB-Sigma's quirks), PROGRESS.md.
go-ethernetip v0.5.1
Date: 2026-11-06
Previous release: v0.5.0
Summary
The scanner now always names the configuration instance in the Class 1
connection path, as every other originator does. The interop suite can also
run against OT Fabric's own image.
Changes
- scanner: the Forward_Open (and Forward_Close) path is
20 04 24 <ConfigInstance> 2C <O->T> 2C <T->O>, also with
ConfigInstance0. Before, 0 left the instance segment out. EEIP.NET,
eeip.py, python-ethernetip and cB-Sigma's enip send it, instance 0 included,
and cB-Sigma's adapter refuses the path without it (0x01 / 0x0315). Checked
on the wire with ConfigInstance 0: cB-Sigma's enip, gologix and
go-ethernetip's server open the connection. OpENer refuses configuration 0
in both forms (0x012F; its exclusive owner needs 151), so nothing changes
there. The server already accepted both forms. No API change. - interop: the opt-in
otfabricadapter (ethernetip-interop-otfabric,
this library behind the harness contract), selected with
ETHERNETIP_INTEROP_ADAPTERS, and the manual Self-interop workflow.
Results against it are not independent evidence.
go-ethernetip v0.5.0
Date: 2026-11-05
Previous release: v0.4.0
Summary
Three value and EDS fixes found while hardening ethernetipctl: REAL values
out of range, ULINT and LWORD values above the int64 range, and EDS strings
with control characters.
Changes
- logix:
Floats(cip.TypeREAL, x)fails withErrTypefor a finite
value outside the REAL range; it wrote an infinity. Infinities and NaN are
still accepted; values inside the range are still rounded to the nearest
REAL. NewUints(t, vs ...uint64)builds unsigned values, including ULINT
and LWORD values above 2^63−1, whichIntscannot take. - eds:
Buildrefuses a vendor name, description, product name,
assembly name or connection name with a control character. An EDS string
has no escape for a newline, so such a name gave a file that does not
parse. - Tests:
TestTargetTimesOutOriginatorwaits for the output to leave
run instead of checking it once. The connection leaves the registry just
before it is shut down, so a single check could fail under load.
TestScannerManyAdaptersuses a 20 ms RPI (5 ms connections timed out on
a loaded macOS runner).