summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 21:27:59 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 21:27:59 +0200
commit02c72f46bd3990a9835eb82c72da5fed37107470 (patch)
tree0b5dbf5da9642c90cc5ec415cafe9cebf43703e4 /src
parent7879164915659c16b96b4bb5c4a6dca13b793f37 (diff)
downloadfastd-02c72f46bd3990a9835eb82c72da5fed37107470.tar
fastd-02c72f46bd3990a9835eb82c72da5fed37107470.zip
peer: remove dead code fastd_remote_matches_dynamic()
Diffstat (limited to 'src')
-rw-r--r--src/peer.c21
-rw-r--r--src/peer.h2
2 files changed, 0 insertions, 23 deletions
diff --git a/src/peer.c b/src/peer.c
index 53b9f64..a661709 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -846,27 +846,6 @@ void fastd_peer_set_established(fastd_peer_t *peer) {
pr_info("connection with %P established.", peer);
}
-/** Checks if an address would be a valid address which could be resolved for a given remote config */
-bool fastd_remote_matches_dynamic(const fastd_remote_config_t *remote, const fastd_peer_address_t *addr) {
- if (!remote->hostname)
- return false;
-
- if (remote->address.sa.sa_family != AF_UNSPEC &&
- remote->address.sa.sa_family != addr->sa.sa_family)
- return false;
-
- if (addr->sa.sa_family == AF_INET6) {
- if (remote->address.in.sin_port != addr->in6.sin6_port)
- return false;
- }
- else {
- if (remote->address.in.sin_port != addr->in.sin_port)
- return false;
- }
-
- return true;
-}
-
/** Compares two MAC addresses */
static inline int eth_addr_cmp(const fastd_eth_addr_t *addr1, const fastd_eth_addr_t *addr2) {
return memcmp(addr1->data, addr2->data, ETH_ALEN);
diff --git a/src/peer.h b/src/peer.h
index 7fcb092..1819f3c 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -222,8 +222,6 @@ static inline bool fastd_peer_config_is_floating(const fastd_peer_config_t *conf
return (!config->remotes || config->floating);
}
-bool fastd_remote_matches_dynamic(const fastd_remote_config_t *remote, const fastd_peer_address_t *addr);
-
/** Checks if a peer is floating (is has at least one floating remote or no remotes at all) */
static inline bool fastd_peer_is_floating(const fastd_peer_t *peer) {
return peer->config ? fastd_peer_config_is_floating(peer->config) : true;