RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… - #277
RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to…#277manigandanj wants to merge 4 commits into
Conversation
… router mode in Bananapi Reason for change: Aligning to latest code. Removing workaround fix. Test procedure: Tested the transition between bridgemode and routermode. Risks: None Signed-off-by: Manigandan Gopalakrishnan <Manigandan_Gopalakrishnan@comcast.com>
739a5b0 to
2f6b5dc
Compare
cpokuru
left a comment
There was a problem hiding this comment.
Is this change tested with Non MLO build
There was a problem hiding this comment.
Pull request overview
This PR updates BananaPi bridge/router mode switching to remove a prior workaround for brlan0 not getting an IP when transitioning from bridge mode to router mode, by aligning bridge membership handling and default MultiLAN/L2Net port configuration.
Changes:
- Update
service_bridge_bpi.shto unconditionally add/removewifi0/wifi1/wifi2andmld0from the LAN bridge during mode transitions. - Update
bbhm_def_cfg_banana.xmlL2Net bridge membership/port definitions to uselan1/lan2/lan3andwifi0/wifi1/wifi2, and adjustPrimaryLAN_brportaccordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh | Adjusts bridge membership changes during start/stop (WiFi + MLD handling) as part of mode switching. |
| meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-psm/bbhm_def_cfg_banana.xml | Updates default L2Net/MultiLAN interface membership and bridge port numbering to match BananaPi interface naming. |
Suppressed comments (1)
meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:635
- These brctl addif calls are now unconditional. If wifi0/wifi1/wifi2 or mld0 do not exist yet, this will log errors and leave interfaces un-added. Guarding on /sys/class/net/ keeps the new behavior (no iwconfig dependency) while avoiding spurious failures.
echo "brctl addif $bridge_name wifi0 wifi1 wifi2"
brctl addif "$bridge_name" wifi0
brctl addif "$bridge_name" wifi1
brctl addif "$bridge_name" wifi2
brctl addif "$bridge_name" mld0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (3)
meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:610
- Unconditionally removing interfaces from the bridge can emit errors (and return non-zero) when wifi0/wifi1/wifi2/mld0 are not yet created. Guard on interface existence (and update the log message to include mld0) to keep bridge transitions robust and logs clean.
echo "brctl delif $bridge_name wifi0 wifi1 wifi2"
brctl delif "$bridge_name" wifi0
brctl delif "$bridge_name" wifi1
brctl delif "$bridge_name" wifi2
brctl delif "$bridge_name" mld0
meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:635
- Unconditionally adding interfaces to the bridge can emit errors (and return non-zero) when wifi0/wifi1/wifi2/mld0 are not yet created. Guard on interface existence (and update the log message to include mld0) to keep bridge transitions robust and logs clean.
echo "brctl addif $bridge_name wifi0 wifi1 wifi2"
brctl addif "$bridge_name" wifi0
brctl addif "$bridge_name" wifi1
brctl addif "$bridge_name" wifi2
brctl addif "$bridge_name" mld0
meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-psm/bbhm_def_cfg_banana.xml:319
dmsb.l2net.1.Members.SWis set to a single space, but other emptyMembers.SWrecords in this same file are empty (e.g.,dmsb.l2net.2.Members.SW). Use an empty value for consistency and to avoid consumers treating whitespace as a value.
<Record name="dmsb.l2net.1.Members.SW" type="astr"> </Record>
… router mode in Bananapi
Reason for change: Removing workaround fix.
Test procedure: Tested bridgemode to routermode switching
Risks: None