diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs index 0bbc367..9b239b5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,8 +14,8 @@ pub enum Error { #[error("ipnet prefix len: {0}")] IpnetPrefixLen(#[from] ipnet::PrefixLenError), - #[error("rsdsl_netlinkd_sys: {0}")] - RsdslNetlinkdSys(#[from] rsdsl_netlinkd_sys::Error), + #[error("rsdsl_netlinkd: {0}")] + RsdslNetlinkd(#[from] rsdsl_netlinkd::Error), #[error("serde_json: {0}")] SerdeJson(#[from] serde_json::Error), #[error("trust_dns_resolver resolve: {0}")] diff --git a/src/main.rs b/src/main.rs index ba4fd21..feb4d3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use std::thread; use std::time::Duration; use ipnet::Ipv6Net; -use rsdsl_netlinkd_sys::IpIp6; +use rsdsl_netlinkd::tunnel::IpIp6; use rsdsl_pd_config::PdConfig; use signal_hook::{consts::SIGUSR1, iterator::Signals}; use sysinfo::{ProcessExt, Signal, System, SystemExt}; @@ -38,7 +38,12 @@ fn logic(tnl: &mut Option<IpIp6>) -> Result<()> { if let Some(ref aftr) = pdconfig.aftr { let local = local_address(&pdconfig)?; let remote = multitry_resolve6(&pdconfig, aftr)?; - *tnl = Some(IpIp6::new("dslite0", "ppp0", local, remote)?); + *tnl = Some(IpIp6::new( + "dslite0".to_string(), + "ppp0".to_string(), + local, + remote, + )?); for netlinkd in System::default().processes_by_exact_name("/bin/rsdsl_netlinkd") { netlinkd.kill_with(Signal::User1); |