Skip to content

Conversation

@aparcar
Copy link
Contributor

@aparcar aparcar commented May 5, 2024

Description

In case there are more user network interfaces defined, allow to specific the netdev. If omitted, an empty string is passed and the behaviour is like before.

This is useful for testing OpenWrt inside a QEMU instance, since OpenWrt expects by default a LAN interface on eth0 and a WAN interface (with uplink) on eth1. Previously the port forward would always be added to eth1, which doesn't support SSH due to firewall policies. By adding the netdev to the forward function, the SSHDriver works as expected.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

@aparcar
Copy link
Contributor Author

aparcar commented May 5, 2024

I'm not sure if this feature is to OpenWrt specific

@codecov
Copy link

codecov bot commented May 5, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.2%. Comparing base (b327f81) to head (f9697e6).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1391   +/-   ##
======================================
  Coverage    45.2%   45.2%           
======================================
  Files         174     174           
  Lines       13743   13747    +4     
======================================
+ Hits         6212    6221    +9     
+ Misses       7531    7526    -5     
Flag Coverage Δ
3.10 45.2% <100.0%> (+<0.1%) ⬆️
3.11 45.2% <100.0%> (+<0.1%) ⬆️
3.12 45.2% <100.0%> (+<0.1%) ⬆️
3.13 45.2% <100.0%> (+<0.1%) ⬆️
3.14 45.2% <100.0%> (+<0.1%) ⬆️
3.9 45.2% <100.0%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Emantor
Emantor previously approved these changes May 6, 2024
@jluebbe
Copy link
Member

jluebbe commented Jul 17, 2024

Looks good otherwise. Please fix the typo, rebase and mark it as "ready for review".

Copy link
Contributor

@sjg20 sjg20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with typo fixed

@aparcar aparcar marked this pull request as ready for review June 3, 2025 09:25
@aparcar
Copy link
Contributor Author

aparcar commented Jun 3, 2025

@jluebbe this should be ready now, please have another look, thanks

Emantor
Emantor previously approved these changes Jul 17, 2025
@Emantor Emantor assigned jluebbe and Bastian-Krause and unassigned aparcar Jul 17, 2025
Copy link
Member

@Bastian-Krause Bastian-Krause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about hostfwd_remove? Doesn't that need the netdev parameter, too?

@aparcar
Copy link
Contributor Author

aparcar commented Jul 18, 2025

Thanks @Bastian-Krause I incorporated your suggestions

@aparcar aparcar force-pushed the netdev branch 2 times, most recently from 71b2aff to 4711802 Compare July 23, 2025 07:30
In case there are more `user` network interfaces defined, allow to
specific the netdev. If omitted, an empty string is passed and the
behaviour is like before.

This is useful for testing OpenWrt inside a QEMU instance, since OpenWrt
expects by default a LAN interface on eth0 and a WAN interface (with
uplink) on eth1. Previously the port forward would always be added to
eth1, which doesn't support SSH due to firewall policies. By adding the
netdev to the forward function, the SSHDriver works as expected.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[bst: rebased, prevent double space in QMP command, adjust commit
message to fit labgrid's style]
Signed-off-by: Bastian Krause <bst@pengutronix.de>
@Bastian-Krause
Copy link
Member

Force-pushed: rebased, prevent double space in QMP command, adjust commit subject to fit labgrid's style

@aparcar
Copy link
Contributor Author

aparcar commented Feb 3, 2026

🍿

@Bastian-Krause Bastian-Krause merged commit 38d41d5 into labgrid-project:master Feb 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants