Skip to content

v1.17.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 15:38
· 249 commits to main since this release
v1.17.0
10453a0
  • 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
    flash refuses 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 failed accept() 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 a flash that 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.sh seeds the LOID of its "held" cases without sed -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.xml or lastgood_hs.xml
    (after flash_eraseall of config, 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.xml gets a MAC of the Realtek prefix and three random
    bytes. With GPON_SN empty the PON stays down: the gponsn and
    gponact steps, a respawned omcid and an apply.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-reseeded until config-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 as 7F000001),
    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 set cannot 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... changes GPON_SN,
    GPON_PLOAM_PASSWD, LOID or LOID_PASSWD as 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, or keep, 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, and revert tries again. A reboot undoes a
    trial. status shows 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_directed line 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 change apply.sh omci warns; after two in a row
    (within 24 h) omcid holds a changed identity back (result=held, the ONU
    stays on the identity it runs) until apply.sh omci --confirm. While it
    holds, flash set refuses to store a changed GPON_SN,
    GPON_PLOAM_PASSWD, LOID, LOID_PASSWD, LOID_OLD or
    LOID_PASSWD_OLD, and flash default cs to 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 --confirm stores
    it once the OLT accepts it.
    apply.sh omci --revert is the confirmation for going back, recorded as a
    revert and skipped by the count. omcli state adds a reregister line,
    event=reload_done a refusals field, the status file refusals,
    streak and today. Refs #391.

  • Kernel: Linux 6.18.63 (was 6.18.58), the upstream stable updates.

  • scripts: host-autoneg.sh, host-serdes.sh and mgmt-addr.sh share 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 of host-autoneg.sh and
    mgmt-addr.sh gives up when its directory cannot be made at all, as the
    one of host-serdes.sh already did, instead of waiting for ever; and a
    state file of mgmt-addr.sh that cannot be renamed into place now makes
    the save fail, as in the other two. Issue #424.

  • image: /sbin/bridge from iproute2 is no longer built or shipped. No
    script, daemon, the web UI or the exporter calls it; br0 is set up with
    the busybox brctl applet, and ip stays. 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 the telnet,
    ftpget and tftp clients. 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, and make lint (make check-applets, tools/check-applets.py)
    refuses an on-device script, /etc/inittab line or fwu.sh command 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=1 leaves 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 -ENETDOWN instead 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 check derives 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 check compares the MIB with what the chip holds and prints
    one line per object, ok or 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 adds pon/omcli_check.txt and
    pon/odi_gpon-ponq.txt and pon/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, and diag-bundle.sh runs
    with a BSD sed and awk (macOS): the scrub no longer uses sed -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.txt is one screen of facts from the bundle files:
    ONU state and its last change, O5 drops in the retained log by cause, LOS and LOF,
    alarms set now, the omcli state reset and drop counts, optics, why the
    previous boot ended, the safe-mode boot count and the failed steps. The new
    diag-summary.sh writes it and reads only the bundle, so it also runs on a
    PC against an unpacked bundle. The diag batch adds the five pon get transceiver reads 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 show compares it with the current values
    (secrets hidden), identity.sh restore writes back what differs and says
    whether apply.sh omci or a reboot is needed, and identity.sh replace --yes takes 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
    says taken=unknown and the file is dated 1970. test/identity_test.sh
    runs on macOS too (no GNU sed -i or stat -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.txt and gpon_init.txt, one line per record in
    the format replayblob.py dump prints, and image/build.sh builds
    /lib/firmware/odi/*.bin from them (replayblob.py build, in the tools
    container, which now carries python3). The binaries are no longer
    committed. A register that src/diag/tools/regnames.txt names 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. build refuses any record the kernel loader refuses and checks
    the record count and CRC-32 in the header line;
    test/replay_tables_test.sh builds each table, dumps it and builds the
    dump back byte for byte, and holds the text to what dump prints. Host
    tests and the SBOM read out/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 getenv and nv setenv read such a pair
    past the end of the block. U-Boot never writes one; it takes a corrupted
    block whose CRC still matches.

  • nv: setenv refuses 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
    and en_wdt, set or unset, and sw_tryactive unset 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 commit for
    sw_commit). sw_tryactive 0, 1, 2 and sw_version0/1 stay open for the
    web UI and fwu.sh. A name with = in it, which would reach the entry
    before it, and an empty one are refused; -- ends the options. The hints in fwu.sh and docs/FLASHING.md now
    point a stale fallback sw_commit to nv 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 on exit without a newline ran exitget ... 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=rejected per 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.txt keeps them with a count beside
    the unknowns, so they reach the diag bundle. omcli state adds an
    unknowns line, a rejected line with the counts by result, and the
    first 16 refusal lines.

  • OMCI tooling: tools/omci-libcheck holds src/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.py generates omci_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.py lists them. The C tables, declarations and macros
    are byte-identical; the header comments no longer name vendor symbols, and
    the JSON drops the oper and extra keys, which nothing read. omcid
    behaviour is unchanged. test/omci_mib_gen_test.sh runs in
    make test-host and fails when the generated files differ from what the
    sources produce.

  • OMCI tooling: src/omci/model/g988.json is 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.py produces it from the PDF on a developer machine;
    the PDF is not stored here.

  • VLAN: with VLAN_EAPOL_UNTAGGED=1 the 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-vid0 rule 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 priorities VLAN_MANU_TAG_PRI does not cover.
    docs/SETTINGS.md says so. Refs #301.

  • Switch: the uniform table sweeps of sdkinit.bin and modload.bin (the
    4,095 VLAN rows of the vlan verb, 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 expand gives back the previous files byte for byte.
    sdkinit.bin shrinks from 267 KB to 65 KB, modload.bin from 63 KB to
    26 KB, and what is left in them is register settings. Refs #398.

  • OMCI: omcli frames prints the last 2048 OMCI frames omcid received or
    sent, as bytes, and omcli frames --pcap FILE writes 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; --full keeps them. The diag bundle adds
    pon/omci.pcap, always masked. Issue #394.

  • make -C src/diag ssp-test no longer leaves core files in src/diag. Its
    overrun case aborts on purpose, and in a container with an unlimited core
    size it wrote core.N and a qemu core there, which make lint (REUSE)
    then refused when the two ran side by side in make 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), and state=end after 600 s
    without one. Each OLT event=mib_reset line adds recent (the OLT resets
    in the last 600 s) and before, 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 state adds a mib resets line with the counts and
    whether a loop is on. Refs #393.

  • Module-load replay: modload.bin drops 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 own PONMAC_RESET pulse, the same sequence gpon_init.bin
    starts with; the GPON init resets the GPON MAC again at the first
    gponact and writes every one of those registers after it, itself or
    through the driver's table clean. replayblob.py trim-modload-gpon takes
    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.bin drops 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, the DONE poll 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-gpon takes
    them out of the mkgponinit.py output, 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.sh no 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.md no longer says flash set refuses 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.md adds 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.sh runs it on the other slot at every
    boot, after the state file is first written (trial-guard.sh waits only 60 s
    for it), records other_slot, other_slot_check and other_slot_detail
    in /var/run/odi-slot, and adds OTHER SLOT BROKEN to the login banner
    and syslog when it fails. A successful nv commit warns, 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