summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-02 19:25:32 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-02 23:59:44 -0600
commitbcf8684c9ec90fe0d283a67d1654d05fb3eae019 (patch)
tree8c5899aa27da3c760590d9fef3a68397ae8365d0
parentnetlink: insert peer version placeholder (diff)
downloadwireguard-monolithic-historical-bcf8684c9ec90fe0d283a67d1654d05fb3eae019.tar.xz
wireguard-monolithic-historical-bcf8684c9ec90fe0d283a67d1654d05fb3eae019.zip
tools: ipc: do not warn on unrecognized netlink attributes
It makes extending things more difficult.
-rw-r--r--src/tools/ipc.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/tools/ipc.c b/src/tools/ipc.c
index e29a939..06590e2 100644
--- a/src/tools/ipc.c
+++ b/src/tools/ipc.c
@@ -95,15 +95,6 @@ static int add_next_to_inflatable_buffer(struct inflatable_buffer *buffer)
return 0;
}
-static void warn_unrecognized(const char *which)
-{
- static bool once = false;
- if (once)
- return;
- once = true;
- fprintf(stderr, "Warning: one or more unrecognized %s attributes\n", which);
-}
-
static FILE *userspace_interface_file(const char *interface)
{
struct stat sbuf;
@@ -438,8 +429,6 @@ static int userspace_get_device(struct wgdevice **out, const char *interface)
peer->tx_bytes = NUM(0xffffffffffffffffULL);
else if (!strcmp(key, "errno"))
ret = -NUM(0x7fffffffU);
- else
- warn_unrecognized("daemon");
}
ret = -EPROTO;
err:
@@ -711,8 +700,6 @@ static int parse_allowedip(const struct nlattr *attr, void *data)
if (!mnl_attr_validate(attr, MNL_TYPE_U8))
allowedip->cidr = mnl_attr_get_u8(attr);
break;
- default:
- warn_unrecognized("netlink");
}
return MNL_CB_OK;
@@ -792,8 +779,6 @@ static int parse_peer(const struct nlattr *attr, void *data)
break;
case WGPEER_A_ALLOWEDIPS:
return mnl_attr_parse_nested(attr, parse_allowedips, peer);
- default:
- warn_unrecognized("netlink");
}
return MNL_CB_OK;
@@ -862,8 +847,6 @@ static int parse_device(const struct nlattr *attr, void *data)
break;
case WGDEVICE_A_PEERS:
return mnl_attr_parse_nested(attr, parse_peers, device);
- default:
- warn_unrecognized("netlink");
}
return MNL_CB_OK;