agent: delete agent-type property in announce

Since there is only one type of agent now, the
agent-type is not needed anymore.

Signed-off-by: liubin <liubin0329@gmail.com>
This commit is contained in:
liubin 2022-07-21 14:53:01 +08:00
parent eec9ac81ef
commit 0d7cb7eb16
2 changed files with 2 additions and 6 deletions

View File

@ -110,10 +110,6 @@ enum SubCommand {
fn announce(logger: &Logger, config: &AgentConfig) {
info!(logger, "announce";
"agent-commit" => version::VERSION_COMMIT,
// Avoid any possibility of confusion with the old agent
"agent-type" => "rust",
"agent-version" => version::AGENT_VERSION,
"api-version" => version::API_VERSION,
"config" => format!("{:?}", config),

View File

@ -64,7 +64,7 @@ impl Handle {
pub async fn update_interface(&mut self, iface: &Interface) -> Result<()> {
// The reliable way to find link is using hardware address
// as filter. However, hardware filter might not be supported
// by netlink, we may have to dump link list and the find the
// by netlink, we may have to dump link list and then find the
// target link. filter using name or family is supported, but
// we cannot use that to find target link.
// let's try if hardware address filter works. -_-
@ -178,7 +178,7 @@ impl Handle {
.with_context(|| format!("Failed to parse MAC address: {}", addr))?;
// Hardware filter might not be supported by netlink,
// we may have to dump link list and the find the target link.
// we may have to dump link list and then find the target link.
stream
.try_filter(|f| {
let result = f.nlas.iter().any(|n| match n {