8000 Improvements around POSIX sockets by elicn · Pull Request #1216 · qilingframework/qiling · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvements around POSIX sockets #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2022
Merged

Conversation

elicn
Copy link
Member
@elicn elicn commented Aug 30, 2022

Improved flexibility around POSIX sockets, after troubleshooting #1214.

Problem

POSIX socket ioctl receives an ifreq structure as an input, where the ifr_name field specifies the name of the network interface. Since Qiling uses native OS sockets under the hood, the interface name passed in the ifr_name field is expected to match the local network interface name.

The Tenda AC15xx firmware specifies br0 as the interface name, and if the local network interface name is different (e.g. eth0), the underlying ioctl operation fails with an OSError saying No such device.

Solution

This PR adds a new option to the NETWORK profile section: ifrname_override. When enabled, Qiling will patch the ifr_name field before passing the data bytes to the udnerlying ioctl. The user may choose to avoid that override by commenting out the option in the profile.

Other

  • Simplified one or two function along the way
  • Improve logging around the flows in subject

@elicn elicn merged commit b78611d into qilingframework:dev Aug 31, 2022
@elicn elicn deleted the tenda-improv branch August 31, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0