diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-01-26 09:23:00 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-01-26 09:23:00 +0100 |
commit | 534ae7240bc5cad6edb9fd160cdb0ff0eb4778de (patch) | |
tree | 9d77fdd80b3fb5da130de1c55b5f96406814447a /src/fastd.h | |
parent | b78d55b69ed9d9c88d12f0159e78973ad0d70b49 (diff) | |
download | fastd-534ae7240bc5cad6edb9fd160cdb0ff0eb4778de.tar fastd-534ae7240bc5cad6edb9fd160cdb0ff0eb4778de.zip |
Add support for link-local bind addresses
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h index ddd05a3..219dc2e 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -363,6 +363,10 @@ static inline size_t fastd_max_outer_packet(const fastd_context_t *ctx) { return PACKET_TYPE_LEN + fastd_max_inner_packet(ctx) + ctx->conf->max_overhead; } +static inline bool fastd_peer_address_is_v6_ll(const fastd_peer_address_t *addr) { + return (addr->sa.sa_family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&addr->in6.sin6_addr)); +} + static inline fastd_string_stack_t* fastd_string_stack_dup(const char *str) { fastd_string_stack_t *ret = malloc(alignto(sizeof(fastd_string_stack_t) + strlen(str) + 1, 8)); ret->next = NULL; |