summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2021-01-06 13:04:02 +0100
committerHans Dedecker <dedeckeh@gmail.com>2021-01-30 21:14:08 +0100
commit8d8a8cd35137ff0fa11b6be455fdd596a8d7d2e9 (patch)
tree3f24ca68e66d1f880a75a794a48a3730f77be4e0 /src/odhcpd.h
parent3bda90079ec5574ef469e2a7804808302f17769d (diff)
dhcpv6-ia: apply prefix_filter on dhcpv6
The prefix_filter allows to select which prefix should be assigned to clients if you have multiple prefixes on an interface. Currently, the filter only applies to RAs and does work with a dhcpv6 server. This commit enables the filter also on dhcpv6. Signed-off-by: Nick Hainke <vincent@systemli.org> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index 45b6784..ee7b008 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -41,6 +41,11 @@
#define IN6_IS_ADDR_ULA(a) (((a)->s6_addr32[0] & htonl(0xfe000000)) == htonl(0xfc000000))
+#define ADDR_MATCH_PIO_FILTER(_addr, iface) (odhcpd_bmemcmp(&(_addr)->addr, \
+ &(iface)->pio_filter_addr, \
+ (iface)->pio_filter_length) != 0 || \
+ (_addr)->prefix < (iface)->pio_filter_length)
+
struct interface;
struct nl_sock;
extern struct vlist_tree leases;