Skip to content

Nfnetfilter queue constants #1628

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 1 commit into from
Mar 1, 2020
Merged

Nfnetfilter queue constants #1628

merged 1 commit into from
Mar 1, 2020

Conversation

vorner
Copy link
Contributor

@vorner vorner commented Dec 28, 2019

Constants for the linux nfqueue netlink protocol (userspace firewall).

Continuation of #1562 and #1571.

@rust-highfive
Copy link

r? @gnzlbg

(rust_highfive has picked a reviewer for you, use r? to override)

@vorner
Copy link
Contributor Author

vorner commented Jan 13, 2020

I somehow missed the build failed and now it seems to be already deleted so I can't have a look why :-(.

Is there a way I can re-run it?

@JohnTitor
Copy link
Member

Hey @vorner could you rebase to make CI happy?
r? @JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned gnzlbg Feb 29, 2020
@vorner
Copy link
Contributor Author

vorner commented Feb 29, 2020

Sure, that makes sense. Even if the failure would be my fault, I'd at least get the logs.

@vorner
Copy link
Contributor Author

vorner commented Feb 29, 2020

So it seems the CI failures are of the same nature as the ones in #1571 ‒ some of the added constants are too new and are not available in the musl sanitized kernel headers yet. I think the options are:

  • Remove these from the pull request (I've included them for completeness, but I don't need these specific ones).
  • Keep them, but somehow omit them from the test on the musl-based targets (I'm not sure how exactly to do that, but I think I'd find a way by studying already existing code). As these are kernel-constants, checking them on glibc should give enough confidence that they are correct.

What would you prefer me to do?

The actuall error message, for future reference:

running: "musl-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-static" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-D_GNU_SOURCE" "-D__GLIBC_USE_DEPRECATED_SCANF" "-o" "/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.o" "-c" "/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c"
cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c:26935:66: error: 'NFQA_VLAN_UNSPEC' undeclared here (not in a function); did you mean 'IFLA_VLAN_UNSPEC'?
cargo:warning=26935 |             static const int __test_const_NFQA_VLAN_UNSPEC_val = NFQA_VLAN_UNSPEC;
cargo:warning=      |                                                                  ^~~~~~~~~~~~~~~~
cargo:warning=      |                                                                  IFLA_VLAN_UNSPEC
cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c:26941:65: error: 'NFQA_VLAN_PROTO' undeclared here (not in a function); did you mean 'IFLA_VXLAN_PORT'?
cargo:warning=26941 |             static const int __test_const_NFQA_VLAN_PROTO_val = NFQA_VLAN_PROTO;
cargo:warning=      |                                                                 ^~~~~~~~~~~~~~~
cargo:warning=      |                                                                 IFLA_VXLAN_PORT
cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c:26947:63: error: 'NFQA_VLAN_TCI' undeclared here (not in a function)
cargo:warning=26947 |             static const int __test_const_NFQA_VLAN_TCI_val = NFQA_VLAN_TCI;
cargo:warning=      |                                                               ^~~~~~~~~~~~~
cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c:27067:59: error: 'NFQA_VLAN' undeclared here (not in a function); did you mean 'NDA_VLAN'?
cargo:warning=27067 |             static const int __test_const_NFQA_VLAN_val = NFQA_VLAN;
cargo:warning=      |                                                           ^~~~~~~~~
cargo:warning=      |                                                           NDA_VLAN
cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-90ac578a5a0490ac/out/main.c:27073:60: error: 'NFQA_L2HDR' undeclared here (not in a function); did you mean 'NFQA_GID'?
cargo:warning=27073 |             static const int __test_const_NFQA_L2HDR_val = NFQA_L2HDR;
cargo:warning=      |                                                            ^~~~~~~~~~
cargo:warning=      |                                                            NFQA_GID

@JohnTitor
Copy link
Member

Remove these from the pull request

I'd prefer this if you don't need them. But could you not remove them but comment out and add FIXME comment so that we don't forget them?

@vorner
Copy link
Contributor Author

vorner commented Feb 29, 2020

I've added the change as a fixup so you can review the changes incrementally. But let me squash it before merging.

@JohnTitor
Copy link
Member

Looks good! CI failure is unrelated to this and fixed in master, could you rebase again?

@vorner
Copy link
Contributor Author

vorner commented Mar 1, 2020

Thanks. I've also done the squashing.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Whoops, CI failure is related actually, I should have checked the log, sorry!

@vorner
Copy link
Contributor Author

vorner commented Mar 1, 2020

OK, fixed, thanks. It's a bit unusual to find a rust project with 80-column policy, the majority is 120.

Constants for the linux nfqueue netlink protocol (userspace firewall).

Continuation of #1562 and #1571.
@vorner
Copy link
Contributor Author

vorner commented Mar 1, 2020

Hmm. This failure seems to be a network issue when setting things up. Is there a way for me to re-run it?

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

We can re-trigger CI by closing/re-opening but previous check was successful so I'm going to merge. Thanks!

@JohnTitor JohnTitor merged commit 829e136 into rust-lang:master Mar 1, 2020
@vorner vorner deleted the nfqueue-consts branch March 1, 2020 20:09
@JohnTitor JohnTitor mentioned this pull request Oct 14, 2020
bors added a commit that referenced this pull request Aug 20, 2022
linux: add missing netfilter definitions

Bring ``libc`` up to parity with Linux v5.18 headers wrt. to Netfilter.

``libc-test`` fails due to unrelated issues on my Fedora box but the
changes should be inocuous enough IMO.

Note there’s a warning in the code indicating potential trouble due to [this
issue](#1628). I’ll sort this out if
the CI run fails.
bors added a commit that referenced this pull request Aug 24, 2022
linux: add missing netfilter definitions

Bring ``libc`` up to parity with Linux v5.18 headers wrt. to Netfilter.

``libc-test`` fails due to unrelated issues on my Fedora box but the
changes should be inocuous enough IMO.

Note there’s a warning in the code indicating potential trouble due to [this
issue](#1628). I’ll sort this out if
the CI run fails.
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.

4 participants