summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@openbsd.org>2017-08-31 14:53:36 -0300
committerGitHub <noreply@github.com>2017-08-31 14:53:36 -0300
commitff228d294813d59ca97b71995aa2d524476c08f0 (patch)
treedbb7aeaa3344cd5208d392bccaca0f6b576976d8 /lib/prefix.h
parent8941a38520ca0c162015fd137311b2b9c6633cbc (diff)
parentb06427987d1015bedc7d43c0087eab7671b097b4 (diff)
Merge pull request #1076 from donaldsharp/connected
Connected
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index a27f46ba0a..823aed30c3 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -315,7 +315,9 @@ extern void prefix_ipv4_free(struct prefix_ipv4 *);
extern int str2prefix_ipv4(const char *, struct prefix_ipv4 *);
extern void apply_mask_ipv4(struct prefix_ipv4 *);
-#define PREFIX_COPY_IPV4(DST, SRC) \
+#define PREFIX_COPY(DST, SRC) \
+ *((struct prefix *)(DST)) = *((const struct prefix *)(SRC))
+#define PREFIX_COPY_IPV4(DST, SRC) \
*((struct prefix_ipv4 *)(DST)) = *((const struct prefix_ipv4 *)(SRC));
extern int prefix_ipv4_any(const struct prefix_ipv4 *);