Skip to content

socket: implement SIOCGIF* netdevice ioctls for netstack - #14165

Open
Rajkaran-122 wants to merge 1 commit into
google:masterfrom
Rajkaran-122:contrib/implement-siocgif-netdevice-ioctls
Open

socket: implement SIOCGIF* netdevice ioctls for netstack#14165
Rajkaran-122 wants to merge 1 commit into
google:masterfrom
Rajkaran-122:contrib/implement-siocgif-netdevice-ioctls

Conversation

@Rajkaran-122

Copy link
Copy Markdown

Implement the SIOCGIFMAP, SIOCGIFTXQLEN, SIOCGIFDSTADDR, and SIOCGIFBRDADDR ioctls for netstack mode. Since gVisor doesn't have real hardware or point-to-point devices, return appropriate default values for compatibility:

  • SIOCGIFMAP: Return zeros (no hardware parameters)
  • SIOCGIFTXQLEN: Return 0 (no TX queue)
  • SIOCGIFDSTADDR: Return zeros (no point-to-point support)
  • SIOCGIFBRDADDR: Return INADDR_ANY for compatibility

This resolves the TODOs and partially implements the ioctls requested in #505.

Implement the SIOCGIFMAP, SIOCGIFTXQLEN, SIOCGIFDSTADDR, and
SIOCGIFBRDADDR ioctls for netstack mode. Since gVisor doesn't have
real hardware or point-to-point devices, return appropriate default
values for compatibility:

- SIOCGIFMAP: Return zeros (no hardware parameters)
- SIOCGIFTXQLEN: Return 0 (no TX queue)
- SIOCGIFDSTADDR: Return zeros (no point-to-point support)
- SIOCGIFBRDADDR: Return INADDR_ANY for compatibility

This resolves the TODOs and partially implements the ioctls requested in google#505.
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.

1 participant