NIOCGREGIF is invalid
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- linux, rust
- Domain
- networking
Research direction
Locate the Rust definitions of NIOCREGIF and compare them with the declarations in netmap_legacy.h and the Linux value reported in the issue. Verify the ioctl call with the platform-specific constant; done means Linux uses the valid value while FreeBSD retains its own definition.
Written by the indexing model from the issue text.
Description
The original NIOCGREGIF is defined in netmap_legacy.h as the following:
/*
* FreeBSD uses the size value embedded in the _IOWR to determine
* how much to copy in/out. So we need it to match the actual
* data structure we pass. We put some spares in the structure
* to ease compatibility with other versions
*/
#define NIOCGINFO _IOWR('i', 145, struct nmreq) /* return IF info */
#define NIOCREGIF _IOWR('i', 146, struct nmreq) /* interface register */
#define NIOCCONFIG _IOWR('i',150, struct nm_ifreq) /* for ext. modules */
The Rust's NIOCREGIF is defined here:
#[cfg(target_os = "linux")]
pub const NIOCREGIF: c_ulong = 3225184658;
#[cfg(target_os = "freebsd")]
pub const NIOCREGIF: c_ulong = 3225184658;
They are different on Linux and libc::ioctl(fd, NIOCREGIF, &mut nmr as *mut nmreq) results in Operation bot supported. Valid NIOCREGIF for Linux is 3225446802, isn't it?
- Dominant language
- Rust
- Stars
- 28
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libpnet/netmap_sys
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
libpnet/netmap_sys#21 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
libpnet/netmap_sys#27 ·
All issues in libpnet/netmap_sys
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
bug rules
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
app bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
IronCoreLabs/ironcore-alloy#346 ·
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100