imsd/packaging
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf bc0e70a17f
ims-pdn-up: the firewall accepts the ims PDN's ESP itself, not only as an answer to a packet of the phone's
A request the network starts (a call to the phone, a text, a NOTIFY)
reaches the phone as an ESP packet on the ims netdev. That packet passes
the firewall's input chain before the kernel decapsulates it, and what
it carried passes the chain again afterwards. The script opened the
chain for the second, imsd's two protected ports. For the first there
was no rule, and pmOS's chain then lets an ESP packet in only as an
answer to one the phone sent ("ct state established"): the connection
tracker has no tracker for ESP, and its generic one keeps the entry for
nf_conntrack_generic_timeout seconds after the last packet either way,
600 on the dev phone. A request the network starts later than that after
the phone's last ESP packet is dropped, and its retransmissions until
the phone next sends to that P-CSCF; imsd sees nothing of it.

What keeps the entry is the CRLF keepalive every 30 s, which goes out
over TCP and outside a call only.

The script now inserts a rule that accepts ESP on qmapmux*, under the
comment imsd-esp and with a check of its own, so that a ruleset which
carries the port rules already (fp6-img's 01_imsd.nft) gets it too. The
kernel drops an ESP packet no SA matches, and what an SA decapsulates
passes the chain again, under the rules a packet on qmapmux* meets
without ESP. Like the port rules the script inserts, the rule is in the
running ruleset only: a reload of the ruleset from its files removes it
until imsd next starts, so a ruleset whose files carry the port rules
has to carry this rule in them as well.

Tested: the script's firewall block by itself on the workstation against
nftables, in two network namespaces with an ESP SA pair between them and
the dev phone's ruleset as read from it (the fp6 journal's
2026-11-24-incoming-dropped-without-ping capture, bench-esp-rule.sh),
the tracker's timeout at 8 s: with 1.2.3's block a connection opened to
port 45062 from the network's side 11 s after the phone's last packet
got no answer, its ESP packets new to the tracker and none through the
chain; with this block the rule was inserted once and the same
connection accepted; an ESP packet with an SPI no SA has dropped by the
kernel behind the chain; a connection through the SA to another port
dropped by the chain; ESP on another interface and an AH packet not
accepted, ESP over IPv4 and ESP on a second qmapmux interface accepted;
the rule gone and the connection unanswered again after the ruleset was
loaded again from its file, and kept where the file carries the rule;
all three rules inserted on a ruleset without imsd's, and connections to
both ports accepted through them; nothing done where there is no inet
filter table. Eleven faults put into the block one at a time, ten in its
rule for ESP, that rule's check and its journal lines and one in a port
rule, were each caught by a step. On the dev phone on KPN the script
inserted the rule at imsd's start, above the port rules it found, and
the daemon resumed its registration; and with the tracker's timeout at 0
for the test, so that every ESP packet from the network came without an
entry, a text sent to the phone's own number was answered, reported and
delivered within a second with the rule (six such packets), and none of
the three reached the daemon in 20 s with the rule taken out (23 such
packets). Not met: a request the network starts after the entry has
lapsed of itself, 600 s after the phone's last ESP packet (a call to the
phone from another line).
2026-11-25 11:30:30 +01:00
..
80-imsd-ofono.preset ofonod: keep VoiceCallManager published across imsd restarts; enable on install 2026-09-20 16:58:42 +02:00
80-imsd.preset packaging: drop the aport; fp6-img installs the published apk 2026-09-02 16:08:21 +02:00
90_imsd-ofono.gschema.override ofonod: GNOME Calls backend over org.ofono for Phosh and GNOME Mobile 2026-09-20 16:07:46 +02:00
APKBUILD.binary project, docs: the linter goes 2026-11-19 16:43:16 +01:00
build-package.sh project, docs: the linter goes 2026-11-19 16:43:16 +01:00
ims-pdn-up.sh ims-pdn-up: the firewall accepts the ims PDN's ESP itself, not only as an answer to a packet of the phone's 2026-11-25 11:30:30 +01:00
imsd-dialerd.desktop ofonod: keep VoiceCallManager published across imsd restarts; enable on install 2026-09-20 16:58:42 +02:00
imsd-handover.sh packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd-ofono-restart-calls.sh README, AGENTS.md: a short README for people, the detail in AGENTS.md 2026-10-06 14:01:33 +02:00
imsd-ofono.post-install packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd-ofono.post-upgrade packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd-ofonod.service packaging, ims-pdn-up, imsd, README: imsd runs without /etc/imsd.env and idles without a SIM 2026-10-13 22:28:03 +02:00
imsd-systemd.post-install packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd-systemd.post-upgrade packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd.post-install packaging: restart imsd and imsd-ofonod on upgrade 2026-10-06 14:01:33 +02:00
imsd.post-upgrade ipsec, imsd, ims-pdn-up: the SA reader and the holds key compare in canonical form; LOCAL is canonicalised, PCSCF= accepted in RFC 5952 §4 form only 2026-10-13 22:28:02 +02:00
imsd.service imsd, engine, packaging: received short messages are kept until an app deletes them — List and Delete on the Messaging interface 2026-11-19 16:43:16 +01:00
make-bin-tarball.sh qmi, imsd-pcscf: read the ims PDN's P-CSCF list from the modem's runtime settings 2026-10-13 22:28:02 +02:00
make-sysroot.sh project, docs: the linter goes 2026-11-19 16:43:16 +01:00
net.catcrafts.IMS1.conf imsd, engine, packaging: received short messages are kept until an app deletes them — List and Delete on the Messaging interface 2026-11-19 16:43:16 +01:00
net.catcrafts.IMS1.policy imsd, engine, packaging: received short messages are kept until an app deletes them — List and Delete on the Messaging interface 2026-11-19 16:43:16 +01:00
org.kde.modem.daemon.desktop packaging: drop the aport; fp6-img installs the published apk 2026-09-02 16:08:21 +02:00
org.ofono.conf imsd, imsd-ofonod: let polkit decide call control, not the account name 2026-10-06 14:01:33 +02:00