Linux/OpenWrt IPTV netdevice: expose one untagged interface over a lower device while keeping the operator's service and multicast VLANs inside the driver.
This is a source repository. kernel/ and the other package directories
follow OpenWrt package layout, so the same tree can also be used as an
OpenWrt feed.
| Path | Package | Description |
|---|---|---|
kernel/iptv/ |
kmod-iptv |
Kernel module, UCI config, init script and apply logic |
luci/luci-app-iptv/ |
luci-app-iptv |
Optional LuCI configuration page |
airoha/ |
— | Archived Airoha PON implementation (reference only) |
docs/ |
— | Design and offload notes |
kernel/iptvandluci/luci-app-iptv: maintained generic implementation.airoha/: archived temporary HG5582A implementation. It modifiesairoha_eth/airoha_ppe/airoha-xponin ways that break the PON driver layering. Do not apply it to the main tree and do not package it.
ip link add name itv link pon0 type iptv
echo 43 3990 > /sys/class/net/itv/vids
echo 1 > /sys/class/net/itv/igmp_on_service
ip link set itv up- TX: unicast uses the service VID; IPv4/IPv6 multicast uses the multicast VID.
- TX: IGMP/MLD control frames use either the service or multicast VID,
selected by
igmp_vid. - RX: frames carrying either VID are stripped and delivered untagged.
- Offload:
iptv_offload_opsis a placeholder seam; no backend is implemented yet.
VLAN IDs and the uplink device live in /etc/config/iptv, shipped by
kmod-iptv:
config iptv 'config'
option enabled '1'
option uplink 'pon0'
option name 'itv'
option service_vid '43'
option mcast_vid '3990'
option igmp_vid 'mcast'
option macaddr ''
igmp_vid selects the upstream VLAN for IGMP/MLD control messages:
mcast(default): usemcast_vid, matching the original behavior;service: useservice_vid.
Some operators keep the multicast VLAN downstream-only and expect the
IGMP/MLD reports on the service VLAN. With mcast selected, those reports
have no upstream flow on the PON link and are dropped, which leaves IPTV
authentication/VOD working while live TV stays black. Select service for
that deployment. Other multicast, including IPv6 NDP, always uses
mcast_vid.
kmod-iptv creates itv at boot (START=19, before network). Select it
in the image config (CONFIG_PACKAGE_kmod-iptv=y); luci-app-iptv also
pulls it in through its package dependency. Address and bridging are
configured with the standard Network pages:
- routed: create an interface with device
itvand protocol DHCP or static; - bridged: add
itvto a bridge device's port list.
No custom netifd protocol is required.
docs/design.md— netdevice model and data pathdocs/offload.md— offload seam and limitationsdocs/pon-integration.md— PON/OpenWrt package, seed, omcproxy and xtables notesdocs/igmp-control-vlan.md— IGMP/MLD upstream VLAN selection
As an OpenWrt feed (optional):
echo 'src-git iptv https://github.com/cc201008/iptv-nd.git' >> feeds.conf
./scripts/feeds update iptv
./scripts/feeds install kmod-iptv luci-app-iptvStandalone kernel module:
make -C /lib/modules/$(uname -r)/build M=$PWD/kernel/iptv/src moduleskmod-iptvcreatesitvbefore netifd starts. Ifpon0does not exist yet, add a retry or a hotplug rule that waits forpon0.enabled=0removesitv; any Network interface or bridge referring to it will fail untilkmod-iptvis enabled again.- The package name
luci-app-iptvconflicts with the older bridge-based package inpon_userspace. Retire or rename one before installing both. airoha/is an archive, not a feed package, and is not built.
kernel/iptv/src: GPL-2.0-only (seeLICENSE)kernel/iptv/filesandluci/luci-app-iptv: Apache-2.0 (seekernel/iptv/LICENSE.scriptsandluci/luci-app-iptv/LICENSE)airoha/: follows the licenses of the files it patches.