Repository navigation
v1.17.0
-
Releases: confd v1.17.0 and metricsd v1.11.0. The web UI adds a link
check under the registration ladder on Status (light, registered, OMCI,
services, traffic, with the first failing stage as one finding), the
transceiver bias current and the uptime, a time on every kernel log line,
a shared PON figure that refreshes every second, a bar when the image
recreated the config store at boot (config-reseed.sh), and LOID, LOID
password and PLOAM password keys that can be emptied again; a write that
flashrefuses answers with flash's own message. The exporter no longer
lets a client that connects and sends nothing hold every scrape behind
it, and waits after a failedaccept()instead of spinning. The asset
hashes in src/release-sha256.txt are the release SHA256SUMS, checked by
make releases. -
flash: waits at most 3 s for its writer lock, down from 5 s. confd gives
up on aflashthat prints nothing for 5 s, so while another write held
the lock a web UI save reported "flash set timed out" instead of flash's
own "flash: busy, another flash holds ..." line. Nothing was written
either way. Refs AndreZiviani/odi-ui#103. -
test:
flash_test.shseeds the LOID of its "held" cases withoutsed -i,
whose GNU form BSD sed reads differently, so the three checks pass on
macOS too. Refs #404. -
boot: a config partition with no
lastgood.xmlorlastgood_hs.xml
(afterflash_eraseallofconfig, the usual way to start clean on the
stock firmware) no longer ends in the safe mode with every web UI save
failing.config-reseed.sh, run by rcS right after the partition is
mounted, installs a missing or empty store file from
/etc/config-template/on the read-only rootfs: the store the stock
firmware writes into an empty partition, taken off-device, with the
serial number, PLOAM password and MAC emptied and four login keys nothing
reads left out. A file that is there is never touched. The stick then
boots on 192.168.1.1, every key can be saved again, and a recreated
lastgood_hs.xmlgets a MAC of the Realtek prefix and three random
bytes. WithGPON_SNempty the PON stays down: thegponsnand
gponactsteps, a respawned omcid and anapply.sh omci
re-registration (result=no_serial) all leave the ONU deactivated
instead of ranging it on the driver's own serial. The recreation is
logged once (config-reseed: event=config_reseeded), recorded in
/etc/config/config-reseededuntilconfig-reseed.sh ack, and named in
the diagnostics summary.docs/FLASHING.md, "An erased config
partition". Refs #438. -
omcid: when the OLT's class 171 table is applied entry by entry, an entry
that leaves frames untagged now goes on the GEM port the 802.1p mapper
sends untagged frames to (its default priority, attribute 12, when its
unmarked-frame option, attribute 10, is 1), as the class 84 rules of the
same port already did. The table's discards go once, with that port, or
with the first port the mapper names when no port takes untagged frames.
Before, both went only with the port that carries priority 0, so on a
mapper that sends priority 0 nowhere they were not installed at all, and
nothing was logged. A mapper that names one GEM port and leaves some
priorities unmapped now gets the same single rules as on the class 84
path, not one rule per mapped priority. Refs #434. -
omcid: a class 171 table with more entries than omcid reads is refused
whole and logged once (ext vlan 171/<instance> entry 34: OLT rule not applied (more entries than omcid keeps), transparent), instead of being
applied in part. Before, only the 12 entries written last were read and
the rest, the ones the OLT wrote first, were dropped without a word: a
13-entry table whose default rules were written first let tagged frames
through although its single-tag default discards them. The cap is now 34
entries per instance, the 24 rules and 8 discards an ingress keeps plus
the two default rules for tagged frames. Refs #435. -
omcid: a Set of a bridge port, VLAN filter, 802.1p mapper, extended VLAN
operation, GEM interworking TP, GEM port or multicast GEM interworking TP
that leaves every value as it was no longer rebuilds the bridge
connections. Before, any such Set had the rebuild a second later
deactivate and re-add every service, so an OLT re-sending its provisioning
on a live line interrupted the traffic for nothing. A Set that changes a
value rebuilds as before, and so does any Set of a table attribute (the
received-frame table of class 171, the multicast address tables of class
281); a Create and a Delete are unchanged. Refs #436. -
trial-guard: the loopback addresses it skips are matched as the stick's
big-endian kernel prints them in/proc/net/tcp(127.0.0.1 as7F000001),
not in the little-endian form. Before, a management host at an address
ending in .127 never counted as TCP proof that the new image is reachable,
so a trial could revert although that host was connected, and a connection
between two different 127/8 addresses counted as proof. The test fixtures
use the big-endian form now. Refs #437. -
Identity trial: reject quotes,
<and&before re-registering, since
flash setcannot persist them. Restore empty saved credentials too when
a later write fails, instead of leaving a mixed identity in the store. -
Identity trial:
identity-trial.sh try KEY=VALUE...changesGPON_SN,
GPON_PLOAM_PASSWD,LOIDorLOID_PASSWDas a trial. The values go to
/var/run/identity-trial.conf, which omcid reads over the store, and omcid
re-registers with them; a refused, timed-out or service-less
re-registration, or a MIB reset loop that starts within 600 s on a line that
had none, goes back to the stored identity by itself (apply.sh omci --revert). After 600 s, orkeep, the values are stored; a key the store
refuses puts the keys already written back, so a reboot never registers with
a mix of old and new values. A revert whose reload fails stays
revert_failed, andreverttries again. A reboot undoes a
trial.statusshows the ONU state, services and MIB resets before and
after. The web UI does not use it yet. Refs #392. -
omcid: re-registrations are counted, and held back after refusals. Every
re-registration a changed identity starts is one line in
/etc/config/odi-reregister(the newest 16: time, change or revert, result,
Deactivate_ONU-IDs, key names, never values). Three Deactivate_ONU-IDs for
the stick's own ONU-ID before O5, or O7, end the wait at once with
result=refused; one or two do not. The kernel counts them in the new
deact_directedline of/proc/odi_gpon/status; a broadcast, or one for
another ONU on the PON, is not counted. omcid never deactivates the ONU
itself after a refusal. After one refused changeapply.sh omciwarns; after two in a row
(within 24 h) omcid holds a changed identity back (result=held, the ONU
stays on the identity it runs) untilapply.sh omci --confirm. While it
holds,flash setrefuses to store a changedGPON_SN,
GPON_PLOAM_PASSWD,LOID,LOID_PASSWD,LOID_OLDor
LOID_PASSWD_OLD, andflash default csto reset one, so a held change
never reaches the store and a reboot cannot apply it
(/var/run/omcid-reregister.hold);identity-trial.sh try --confirmstores
it once the OLT accepts it.
apply.sh omci --revertis the confirmation for going back, recorded as a
revert and skipped by the count.omcli stateadds areregisterline,
event=reload_donearefusalsfield, the status filerefusals,
streakandtoday. Refs #391. -
Kernel: Linux 6.18.63 (was 6.18.58), the upstream stable updates.
-
scripts:
host-autoneg.sh,host-serdes.shandmgmt-addr.shshare the
lock, the state file, the event line and the trial run, expiry and revert
through/etc/scripts/trial-lib.sh, as rcS and rcS.pon share
rcs-lib.sh, instead of three copies. Their behaviour is the same, with
two exceptions in edge cases: the lock ofhost-autoneg.shand
mgmt-addr.shgives up when its directory cannot be made at all, as the
one ofhost-serdes.shalready did, instead of waiting for ever; and a
state file ofmgmt-addr.shthat cannot be renamed into place now makes
the save fail, as in the other two. Issue #424. -
image:
/sbin/bridgefrom iproute2 is no longer built or shipped. No
script, daemon, the web UI or the exporter calls it;br0is set up with
the busyboxbrctlapplet, andipstays. The v1.16.0 binary was 256,452
bytes, 84,472 with xz. Issue #423. -
image: busybox is built from an explicit applet list,
packages/busybox/applets.txt: 176 applets instead of 385, and the
binary goes from 1,479,444 to 933,412 bytes (587,788 to 379,828 with xz).
Left out are, among others, the servers nothing here starts (crond,
udhcpd,tcpsvd), the runit tools, the module tools (the kernel has no module
support), the disk, filesystem, console and mail tools, and thetelnet,
ftpgetandtftpclients. Everything the boot scripts, the services,
fwu.sh, the web UI and the exporter call stays, and so do the tools the
docs name. The busybox build refuses a binary whose applets differ from
the list, andmake lint(make check-applets,tools/check-applets.py)
refuses an on-device script,/etc/inittabline orfwu.shcommand the
image does not ship. Issue #423. -
docs/SWITCH.md, "Priorities an 802.1p mapper discards": a bridge port on a
mapper with one target forwards the tagged frames of a priority the mapper
sets to 0xffff, against G.988 9.3.10, on purpose. Refs #421. -
igmpd: an IGMP join is held to the profile's group limit with the IPv6
groups counted in, as an MLD join already counted the IPv4 ones. Before,
with a limit of 2, an IPv6 group held first let two IPv4 groups in as
well, and the same groups joined the other way round were refused, so
the result depended on which family joined first. A group already held
or static is still not a new one. A report for a static group on another
VLAN no longer counts as a dynamic group in either family, so it no longer
takes a place under the limit. -
igmpd: a static group that does not fit the group table (128 for IPv4, 128
for IPv6) now counts as an overflow, like a range too wide to name, so
IGMP_PON_DROP=1leaves the PON drop off. Before, the lease turned the
drop on although some static groups had no row, and the PON dropped them
as unregistered. -
odi_nic: a raw transmit (omcid's OMCI replies and the IGMP reports sent up
by igmpd) while every interface is down returns-ENETDOWNinstead of
writing into a TX ring that is NULL or being freed. The driver keeps a
flag under its lock, set when the first open has the ring and the hardware
up and cleared first in the last stop, before the work is cancelled and the
rings freed; omcid sees a failed send, as it already does on a full ring.
Issue #419. -
omcid: a bridge connection whose deactivate fails stays owned as pending
and is deactivated again by the next rebuild. Before, the slot was freed
at once and the rule stayed in the switch whenever the next plan did not
reuse that service id, with omcid no longer knowing it owned it. A pending
service is not counted as live, its id is not handed out, and it survives
a respawn in the snapshot. The retry runs on its own every 5 seconds and
touches no live service; it does not trigger a full rebuild. -
OMCI: clear the original CRC of a masked frame in text and pcap exports,
so the checksum cannot reveal the hidden identity or secret.--full
still returns the captured frame unchanged. -
OMCI:
omcli checkderives queue ownership and ordering from the current
MIB, so a pending T-CONT or priority change is reported as a difference
instead of accepting the old programmed queue map. -
OMCI:
omcli checkcompares the MIB with what the chip holds and prints
one line per object,okor what differs: each T-CONT's Alloc-ID against
its CAM row, enable bit and queue mask; each upstream queue's type,
weight, CIR and PIR; each upstream GEM port's flow (valid bit, GEM port,
queue); each downstream GEM port against its CAM row. It looks only at
what omcid set up and writes nothing. The chip side is a new read-only
/proc/odi_gpon/ponq, the upstream PON queue block read back (never
DRN_CMD). The diag bundle addspon/omcli_check.txtand
pon/odi_gpon-ponq.txtandpon/odi_gpon-cam.txt, so a report shows
whether a GEM port, queue or rate reached the hardware even when omcid
does not answer (issue #412). -
Diagnostics bundle: a scrub that fails on any file now fails the bundle
instead of letting that file out unscrubbed, anddiag-bundle.shruns
with a BSD sed and awk (macOS): the scrub no longer usessed -i, and the
config redaction passes its key list to awk on one line, where a BSD awk
had refused it and left the config copies empty. The bundle runs under
LC_ALL=C, so a secret that is not valid UTF-8 still reaches the scrub. -
Diagnostics: label O5 departures and LOS/LOF counts as events in the
retained log, not totals since boot. A wrapped or rate-limited dmesg
must not turn missing history into an all-clear. -
Diagnostics bundle: two files at the top for whoever reads it.
README.md
names the image, says what is redacted and whether the identity is masked,
maps questions to files and lists what a report has to add (ISP, router,
what changed).SUMMARY.txtis one screen of facts from the bundle files:
ONU state and its last change, O5 drops in the retained log bycause, LOS and LOF,
alarms set now, theomcli statereset and drop counts, optics, why the
previous boot ended, the safe-mode boot count and the failed steps. The new
diag-summary.shwrites it and reads only the bundle, so it also runs on a
PC against an unpacked bundle. The diag batch adds the fivepon get transceiverreads the exporter makes on every scrape. -
Identity: the first boot of this image copies the provisioning identity
(GPON_SN,GPON_PLOAM_PASSWD,ELAN_MAC_ADDR,GPON_ONU_MODEL, the four
LOID keys,ONU_HW_VERSION,MAC_KEY,PON_VENDOR_ID,
GPON_PLOAM_FORMAT) to/etc/config/identity.orig, mode 600, and no later
boot rewrites it.identity.sh showcompares it with the current values
(secrets hidden),identity.sh restorewrites back what differs and says
whetherapply.sh omcior a reboot is needed, andidentity.sh replace --yestakes a new copy on purpose. No copy on a safe-mode boot or from a
store without a serial. Not in the diagnostics bundle or the web UI backup.
The copy holds what the stick had at that boot, so on a stick changed
before it is not the factory identity. Taken at boot, before NTP, it
saystaken=unknownand the file is dated 1970.test/identity_test.sh
runs on macOS too (no GNUsed -iorstat -c). Issue #387. -
GPON:
/proc/odi_gpon/drops, a short record of the PON side around every
drop out of O5, frozen when it happens: the 60 s before and the 120 s
after, with PLOAM messages both ways (type and ONU-ID, no contents), ONU
state changes with their cause and side, LOS and LOF edges and the 1 s
sample (state, alarm bits, BIP error blocks). Four records, the first of
the boot kept and the latest three beside it, so a later drop never
overwrites the first. A PLOAM the OLT repeats within 10 ms is one line
with a count, so an OLT that sends every burst three times does not fill a
record before its 120 s. In the diagnostics bundle as
pon/odi_gpon-drops.txt. RAM only for now: a watchdog reset loses it.
Refs #390. -
The register replay tables are text now:
tools/regtrace/tables/holds
sdkinit.txt,modload.txtandgpon_init.txt, one line per record in
the formatreplayblob.py dumpprints, andimage/build.shbuilds
/lib/firmware/odi/*.binfrom them (replayblob.py build, in the tools
container, which now carries python3). The binaries are no longer
committed. A register thatsrc/diag/tools/regnames.txtnames carries
its name as a comment (718 of the 3,326 records), and a change to a table
shows as a text diff. The built files are byte for byte the ones shipped
before.buildrefuses any record the kernel loader refuses and checks
the record count and CRC-32 in the header line;
test/replay_tables_test.shbuilds each table, dumps it and builds the
dump back byte for byte, and holds the text to whatdumpprints. Host
tests and the SBOM readout/firmware/odi/(replayblob.py build-tables).
Issue #411. -
nv: an environment block whose CRC matches but whose last pair has no NUL
before the end of the block, or whose list lacks the closing empty string,
is no longer valid. Before,nv getenvandnv setenvread such a pair
past the end of the block. U-Boot never writes one; it takes a corrupted
block whose CRC still matches. -
nv:
setenvrefuses the keys U-Boot boots by unless--force(or-f)
is given:sw_commit,sw_active,mupgrade_en,bootcmd,
boot_by_commit,boot_by_tryactive,b0,b1,set_act0,set_act1
anden_wdt, set or unset, andsw_tryactiveunset or other than 0, 1 or
2, which U-Boot reads as a trial of slot 1. It refuses before it reads or
writes a copy, says why and names what to run instead (nv commitfor
sw_commit).sw_tryactive0, 1, 2 andsw_version0/1stay open for the
web UI andfwu.sh. A name with=in it, which would reach the entry
before it, and an empty one are refused;--ends the options. The hints infwu.shanddocs/FLASHING.mdnow
point a stale fallbacksw_committonv commit <running slot>, and
setenv's NOTE line adds it. Issue #414. -
diag: a last input line without a newline is read as it stands. Before, a
line shorter than the one before it kept the end of that line, so a batch
that ended onexitwithout a newline ranexitget ...instead. -
omcid: a Delete of an 802.1p mapper (class 130) rebuilds the bridge
connections, as its Create and Set do. Before, the rules built from the
deleted mapper stayed in the switch until another change marked the bridge
plan. -
omcid: refused answers are counted. Every answer to a class omcid models,
for a message type it handles, with a result other than success logs one
event=rejectedper class, operation and result each boot, with the
result by name and, for a Create, Set or Get, the attribute mask the
answer named./var/log/omcid-unknown.txtkeeps them with a count beside
the unknowns, so they reach the diag bundle.omcli stateadds an
unknownsline, arejectedline with the counts by result, and the
first 16 refusal lines. -
OMCI tooling:
tools/omci-libcheckholdssrc/omci/model/g988.json
against the G.988 definitions of omci-lib-go, a second reading of the
Recommendation by an unrelated parser. With omci-lib-go v2.2.4 the two
agree on 733 of the 736 attributes both define; in the other three the
Recommendation says what the fact table says. The library lacks class 330 and six attributes
G.988 added later. Developer tool only:
it needs Go and the network, nothing of it ships, and it is not part of
make test. -
OMCI tooling:
tools/mib-gen.pygeneratesomci_mib.{c,h,json}from the
G.988 fact table and a device profile (src/omci/model/profile.json),
without a stock root filesystem. The profile holds what G.988 does not
define (names, row sizes, the private classes) and every deviation from the
derived value as an override with a classification and a reason;
tools/mib-compare.pylists them. The C tables, declarations and macros
are byte-identical; the header comments no longer name vendor symbols, and
the JSON drops theoperandextrakeys, which nothing read. omcid
behaviour is unchanged.test/omci_mib_gen_test.shruns in
make test-hostand fails when the generated files differ from what the
sources produce. -
OMCI tooling:
src/omci/model/g988.jsonis a fact table of ITU-T G.988
(11/2022) with Amendments 1 and 2 for 75 managed-entity classes: clause,
creation model, actions, and per attribute its width, access, requirement
and AVC, table and PM flags. It holds no wording of the Recommendation.
tools/g988-extract.pyproduces it from the PDF on a developer machine;
the PDF is not stored here. -
VLAN: with
VLAN_EAPOL_UNTAGGED=1the stick now takes the tag off every
priority-tagged frame (VID 0, any priority) the OLT sends, so EAPOL that
comes down as VID 0 priority 7 reaches the router untagged. Before, the
eapol-down-vid0rule passed those frames with their VID 0 tag, and some
routers drop tagged EAPOL on an untagged WAN interface. The rule cannot
tell EAPOL from other frames behind a tag, so it applies to all VID 0
frames; a row that names VID 0 and a priority, such as the multicast VID 0
priority 0 row, still goes first. With the manual VID 0 the rule is now
made too and strips the prioritiesVLAN_MANU_TAG_PRIdoes not cover.
docs/SETTINGS.mdsays so. Refs #301. -
Switch: the uniform table sweeps of
sdkinit.binandmodload.bin(the
4,095 VLAN rows of thevlanverb, the 512 and 1,024 CF table rows of
classify, the 1,024 CF rows of the module-load replay) are now table
fills the driver writes in code, one call record each, instead of
replayed row by row. The writes and their order are unchanged:
replayblob.py expandgives back the previous files byte for byte.
sdkinit.binshrinks from 267 KB to 65 KB,modload.binfrom 63 KB to
26 KB, and what is left in them is register settings. Refs #398. -
OMCI:
omcli framesprints the last 2048 OMCI frames omcid received or
sent, as bytes, andomcli frames --pcap FILEwrites them as a pcap that
Wireshark decodes with the common OMCI Lua dissector (Ethernet II,
EtherType 0x88B5). omcid keeps them in a fixed 120 KB ring in RAM, filled
where it already receives and sends. By default the values of the classes
omcid keeps out of its log, the LOID and password, the serial number and
the MACs are overwritten;--fullkeeps them. The diag bundle adds
pon/omci.pcap, always masked. Issue #394. -
make -C src/diag ssp-testno longer leaves core files insrc/diag. Its
overrun case aborts on purpose, and in a container with an unlimited core
size it wrotecore.Nand a qemu core there, whichmake lint(REUSE)
then refused when the two ran side by side inmake test. -
omcid: a MIB reset loop is named instead of left to be counted in the log.
Three or more MIB resets from the OLT within 600 s log one
event=mib_reset_loop state=start(warning), andstate=endafter 600 s
without one. Each OLTevent=mib_resetline addsrecent(the OLT resets
in the last 600 s) andbefore, the last six requests before it as
op:class.instance, so the log shows what the OLT read or wrote just before
it gave up.omcli stateadds amib resetsline with the counts and
whether a loop is on. Refs #393. -
Module-load replay:
modload.bindrops from 3,619 records to 1,748 (130 KB
to 63 KB). The 1,871 GPON MAC register writes it carried are a bring-up
with its ownPONMAC_RESETpulse, the same sequencegpon_init.bin
starts with; the GPON init resets the GPON MAC again at the first
gponactand writes every one of those registers after it, itself or
through the driver's table clean.replayblob.py trim-modload-gpontakes
them out and refuses a register the GPON init does not write again. The
boot register stream loses exactly those writes and the reads before
them; nothing else moves. -
GPON boot init:
gpon_init.bindrops from 2,528 records to 800 (91 KB to
29 KB). Gone are the replay's own clean of the GEM-port CAM, the flow
type words, the Alloc-ID CAM and the multicast MAC filter, which ran
again after the driver's clean (odi_gpon_init_clean_tables(), with the
reset wait, theDONEpoll and a read-back) on tables already clear, and
the stock driver's sweep of the per-flow counter index registers, which
selects each counter without reading it.replayblob.py trim-gpontakes
them out of themkgponinit.pyoutput, each sweep matched whole and once.
The boot register stream loses exactly those 1,728 writes
(test/fixtures/boot-golden-common.txt); nothing else moves. -
Tests:
test/apply_test.shno longer fails now and then on a busy runner
("identity: back in O5 with services"). Its stub omcid read the case
script while it ran, so a reload still in progress could read the
script of the next case from its old offset and overwrite the status
with a fragment of it. The stub now reads the script once per reload. -
Docs:
SETTINGS.mdno longer saysflash setrefuses an empty value. It
stores one for a stock key and removes an odi-only key; only the web UI
cannot clear a key. -
Docs:
QUALIFICATION.mdadds a second HSGQ v08 report at 2.5G against a
MikroTik RB5009 (HOST_SERDES=2500basex, v1.15.0 and v1.16.0, warm and cold
boot, a live try and confirm). Refs #369. -
Slots:
nv slotcheck <slot>, a partial check of a slot: the kernel
partition holds a uImage whose magic, header CRC and data CRC are good and
whose size fits the partition, and the rootfs partition starts with a
version 4.0 squashfs superblock that fits it. Not proof that the slot
boots; it catches a slot that cannot, such as a kernel left half-written
by an interrupted flash.slot-state.shruns it on the other slot at every
boot, after the state file is first written (trial-guard.sh waits only 60 s
for it), recordsother_slot,other_slot_checkandother_slot_detail
in/var/run/odi-slot, and addsOTHER SLOT BROKENto the login banner
and syslog when it fails. A successfulnv commitwarns, after its result
line, when that recorded check failed (issue #379, point 3).
Flashing and first login
This is a keys-only image: root has no password at all, and ssh does not
offer a password prompt (ROOT_PW=locked, see docs/BUILDING.md). Flash
it into the slot you are not running and trial-boot it --
nv setenv sw_tryactive <slot>; reboot -- never commit on the first boot.
Full procedure, including how to read a boot you could not otherwise see:
docs/FLASHING.md.
First access is the web UI on port 80 (admin/admin until you change
it): add your SSH public key under its SSH-key admin page, then
ssh root@<stick> with that key -- it keeps working across reboots and
re-flashes. docs/ACCESS.md has every way in and how to
move files on and off the stick.
Verify the download against SHA256SUMS before flashing anything:
sha256sum -c SHA256SUMS