Skip to content
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

Update nix dependency to 0.27 #610

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
profile: minimal
# Please adjust README and rust-version field in Cargo.toml files when
# bumping version.
toolchain: 1.64.0
toolchain: 1.65.0
components: rustfmt
default: true
- uses: Swatinem/rust-cache@v2
Expand Down
20 changes: 15 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/bpf_query/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
libbpf-rs = { path = "../../libbpf-rs" }
nix = { version = "0.26", default-features = false, features = ["net", "user"] }
nix = { version = "0.27", default-features = false, features = ["net", "user"] }
clap = { version = "4.0.32", default-features = false, features = ["std", "derive", "help", "usage"] }

[target.'cfg(target_arch = "x86_64")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/tc_port_whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyhow = "1.0"
libbpf-rs = { path = "../../libbpf-rs" }
libc = "0.2"
plain = "0.2"
nix = { version = "0.26", default-features = false, features = ["net", "user"] }
nix = { version = "0.27", default-features = false, features = ["net", "user"] }
clap = { version = "4.0.32", default-features = false, features = ["std", "derive", "help", "usage"] }

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/tproxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ anyhow = "1.0"
clap = { version = "4.0.32", default-features = false, features = ["std", "derive", "help", "usage"] }
ctrlc = "3.2"
libbpf-rs = { path = "../../libbpf-rs" }
nix = { version = "0.26", default-features = false, features = ["net", "user"] }
nix = { version = "0.27", default-features = false, features = ["net", "user"] }

[build-dependencies]
libbpf-cargo = { path = "../../libbpf-cargo" }
12 changes: 6 additions & 6 deletions examples/tproxy/src/bin/proxy.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::net::TcpListener;
use std::net::TcpStream;
use std::os::unix::io::FromRawFd;
use std::os::unix::io::AsRawFd as _;
use std::str::FromStr;

use anyhow::Context;
Expand Down Expand Up @@ -56,17 +56,17 @@ fn main() -> Result<()> {
.context("Failed to create listener socket")?;

// Set some sockopts
setsockopt(fd, ReuseAddr, &true).context("Failed to set SO_REUSEADDR")?;
setsockopt(fd, IpTransparent, &true).context("Failed to set IP_TRANSPARENT")?;
setsockopt(&fd, ReuseAddr, &true).context("Failed to set SO_REUSEADDR")?;
setsockopt(&fd, IpTransparent, &true).context("Failed to set IP_TRANSPARENT")?;

// Bind to addr
let addr = format!("{}:{}", opts.addr, opts.port);
let addr = SockaddrIn::from_str(&addr).context("Failed to parse socketaddr")?;
bind(fd, &addr).context("Failed to bind listener")?;
bind(fd.as_raw_fd(), &addr).context("Failed to bind listener")?;

// Start listening
listen(fd, 128).context("Failed to listen")?;
let listener = unsafe { TcpListener::from_raw_fd(fd) };
listen(&fd, 128).context("Failed to listen")?;
let listener = TcpListener::from(fd);

for client in listener.incoming() {
let client = client.context("Failed to connect to client")?;
Expand Down
5 changes: 5 additions & 0 deletions libbpf-cargo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Unreleased
----------
- Bumped minimum Rust version to `1.65`


0.21.2
------
- Added `Default` impl for generated `struct` types containing pointers
Expand Down
2 changes: 1 addition & 1 deletion libbpf-cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
version = "0.21.2"
authors = ["Daniel Xu <dxu@dxuuu.xyz>", "Daniel Müller <deso@posteo.net>"]
edition = "2021"
rust-version = "1.64"
rust-version = "1.65"
license = "LGPL-2.1-only OR BSD-2-Clause"
keywords = ["bpf", "ebpf", "libbpf"]

Expand Down
2 changes: 1 addition & 1 deletion libbpf-cargo/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![CI](https://github.com/libbpf/libbpf-rs/workflows/Rust/badge.svg?branch=master)
[![rustc](https://img.shields.io/badge/rustc-1.64+-blue.svg)](https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html)
[![rustc](https://img.shields.io/badge/rustc-1.65+-blue.svg)](https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html)

# libbpf-cargo

Expand Down
1 change: 1 addition & 0 deletions libbpf-rs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Unreleased
- Added `AsRawLibbpf` trait as a unified way to retrieve `libbpf` equivalents
for `libbpf-rs` objects
- Implemented `Send` for `Link`
- Bumped minimum Rust version to `1.65`
- Updated `bitflags` dependency to `2.0`


Expand Down
4 changes: 2 additions & 2 deletions libbpf-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
version = "0.21.2"
authors = ["Daniel Xu <dxu@dxuuu.xyz>", "Daniel Müller <deso@posteo.net>"]
edition = "2021"
rust-version = "1.64"
rust-version = "1.65"
license = "LGPL-2.1-only OR BSD-2-Clause"
keywords = ["bpf", "ebpf", "libbpf"]

Expand All @@ -25,7 +25,7 @@ bitflags = "2.0"
lazy_static = "1.4"
libbpf-sys = { version = "1.0.3" }
libc = "0.2"
nix = { version = "0.26", default-features = false, features = ["net", "user"] }
nix = { version = "0.27", default-features = false, features = ["net", "user"] }
num_enum = "0.5"
strum_macros = "0.24"
thiserror = "1.0.10"
Expand Down
2 changes: 1 addition & 1 deletion libbpf-rs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![CI](https://github.com/libbpf/libbpf-rs/workflows/Rust/badge.svg?branch=master)
[![rustc](https://img.shields.io/badge/rustc-1.64+-blue.svg)](https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html)
[![rustc](https://img.shields.io/badge/rustc-1.65+-blue.svg)](https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html)

# libbpf-rs

Expand Down
Loading