Skip to content

Commit

Permalink
Merge branch 'main' into feat/ipv6-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Easen authored Apr 27, 2024
2 parents 4dce79f + 9e2e9e1 commit 8af9bdd
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"bump-minor-pre-major": true
"bump-minor-pre-major": true,
".": "0.5.0"
}
4 changes: 3 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
"eth0",
"--interface",
"eth0.20",
"--interface",
"eth0.30",
"--additional-subnet",
"192.168.10.0/24",
"--ignore-question-subnet",
"10.1.100.0/24"
"10.1.30.0/24"
]
}
]
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [0.5.0](https://github.com/Easen/rust-mdns-repeater/compare/v0.4.0...v0.5.0) (2024-02-25)


### ⚠ BREAKING CHANGES

* cli args ([#13](https://github.com/Easen/rust-mdns-repeater/issues/13))

### Bug Fixes

* cli args ([#13](https://github.com/Easen/rust-mdns-repeater/issues/13)) ([d7ef09a](https://github.com/Easen/rust-mdns-repeater/commit/d7ef09a446358cd6b1dc68046ed7e230c502b93f))


### Miscellaneous Chores

* release 0.5.0 ([b7020ca](https://github.com/Easen/rust-mdns-repeater/commit/b7020cadafbd3d1f9780ecf69761237a1790a34e))

## [0.4.0](https://github.com/Easen/rust-mdns-repeater/compare/v0.3.2...v0.4.0) (2024-02-25)


Expand Down
2 changes: 1 addition & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rust-mdns-repeater"
version = "0.4.0"
version = "0.5.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
10 changes: 9 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ struct Args {
/// Ignore mDNS question/queries from these IPv4/IPv6 Subnets
#[arg(long)]
ignore_question_subnet: Vec<String>,

/// Log errors instead of exiting when an errors occurs during forwarding
#[arg(long)]
error_instead_of_exit: bool

#[arg(long, default_value_t = false)]
disable_ipv4: bool,
Expand Down Expand Up @@ -277,7 +281,11 @@ fn main() -> Result<()> {
};
match sendto(interface.tx_fd().as_raw_fd(), data, dst, MsgFlags::empty()) {
Err(err) => {
error!("Unable to forward mDNS packets from {:?} to {:?} due to error - {:?}", addr, interface.name(), err)
let error_message = format!("Unable to forward mDNS packets from {:?} to {:?} due to error - {:?}", addr, interface.name(), err);
if !args.error_instead_of_exit {
panic!("{}", error_message);
}
error!("{}", error_message);
}
Ok(_) => info!(
"Forwarded mDNS packets from {:?} to {:?} ({} bytes)",
Expand Down

0 comments on commit 8af9bdd

Please sign in to comment.