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

Added option to specify the network interface (now it works on FreeBSD) #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rm1984
Copy link

@rm1984 rm1984 commented Apr 22, 2021

Hi,
this is a pull request to fix my issue #20 .
It adds a new command line parameter to specify a network interface to listen on.
Now it works on FreeBSD (because it doesn't support the "any" inferface).
Bye,
Riccardo

@@ -109,7 +111,7 @@ fn parse_args() -> Result<Opts> {
let matches = match opts.parse(&args[1..]) {
Ok(m) => m,
Err(f) => {
panic!(f.to_string())
panic!("{}", f.to_string())
Copy link
Author

Choose a reason for hiding this comment

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

this produced a warning

@@ -119,8 +121,13 @@ fn parse_args() -> Result<Opts> {
let mut opts = Opts {
source: Source::Port(53),
timestamp: matches.opt_present("t"),
nic: "any".to_string(),
Copy link
Author

Choose a reason for hiding this comment

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

default value to "any"

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