projects
/
project
/
odhcp6c.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove obsolete prefix class support
[project/odhcp6c.git]
/
src
/
dhcpv6.c
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index 6ae6f7a02fd8d9040fc8b676cd81a73d361d21c6..000d9993d6a991e0d98b33944522e4a71d3fd776 100644
(file)
--- a/
src/dhcpv6.c
+++ b/
src/dhcpv6.c
@@
-173,9
+173,6
@@
int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout)
htons(DHCPV6_OPT_PD_EXCLUDE),
htons(DHCPV6_OPT_SOL_MAX_RT),
htons(DHCPV6_OPT_INF_MAX_RT),
htons(DHCPV6_OPT_PD_EXCLUDE),
htons(DHCPV6_OPT_SOL_MAX_RT),
htons(DHCPV6_OPT_INF_MAX_RT),
-#ifdef EXT_PREFIX_CLASS
- htons(DHCPV6_OPT_PREFIX_CLASS),
-#endif
#ifdef EXT_CER_ID
htons(DHCPV6_OPT_CER_ID),
#endif
#ifdef EXT_CER_ID
htons(DHCPV6_OPT_CER_ID),
#endif
@@
-1146,7
+1143,7
@@
static int dhcpv6_parse_ia(void *opt, void *end)
// Update address IA
dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) {
struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0,
// Update address IA
dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) {
struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0,
- IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0
, 0
};
+ IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0};
entry.iaid = ia_hdr->iaid;
entry.iaid = ia_hdr->iaid;
@@
-1171,14
+1168,6
@@
static int dhcpv6_parse_ia(void *opt, void *end)
uint16_t stype, slen;
uint8_t *sdata;
uint16_t stype, slen;
uint8_t *sdata;
-#ifdef EXT_PREFIX_CLASS
- // Find prefix class, if any
- dhcpv6_for_each_option(&prefix[1], odata + olen,
- stype, slen, sdata)
- if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2)
- entry.class = sdata[0] << 8 | sdata[1];
-#endif
-
// Parse PD-exclude
bool ok = true;
dhcpv6_for_each_option(odata + sizeof(*prefix) - 4U,
// Parse PD-exclude
bool ok = true;
dhcpv6_for_each_option(odata + sizeof(*prefix) - 4U,
@@
-1242,16
+1231,6
@@
static int dhcpv6_parse_ia(void *opt, void *end)
entry.length = 128;
entry.target = addr->addr;
entry.length = 128;
entry.target = addr->addr;
-#ifdef EXT_PREFIX_CLASS
- uint16_t stype, slen;
- uint8_t *sdata;
- // Find prefix class, if any
- dhcpv6_for_each_option(&addr[1], odata + olen,
- stype, slen, sdata)
- if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2)
- entry.class = sdata[0] << 8 | sdata[1];
-#endif
-
odhcp6c_update_entry(STATE_IA_NA, &entry, 0, false);
parsed_ia++;
}
odhcp6c_update_entry(STATE_IA_NA, &entry, 0, false);
parsed_ia++;
}