# Glue attribute to allow decoding of ADSL-Form vendor specific
# DHCP options.
#
-ATTRIBUTE ADSL-Forum-DHCP-Vendor-Specific 0 tlv
-ATTRIBUTE ADSL-Forum-Device-Manufacturer-OUI 0.1 octets
-ATTRIBUTE ADSL-Forum-Device-Serial-Number 0.2 string
-ATTRIBUTE ADSL-Forum-Device-Product-Class 0.3 string
-ATTRIBUTE ADSL-Forum-Gateway-Manufacturer-OUI 0.4 octets
+ATTRIBUTE ADSL-Forum-DHCP-Vendor-Specific 255 tlv
+ATTRIBUTE ADSL-Forum-Device-Manufacturer-OUI 255.1 octets
+ATTRIBUTE ADSL-Forum-Device-Serial-Number 255.2 string
+ATTRIBUTE ADSL-Forum-Device-Product-Class 255.3 string
+ATTRIBUTE ADSL-Forum-Gateway-Manufacturer-OUI 255.4 octets
#
# The first two attributes are prefixed with "ADSL-" because of
goto next;
}
+ /*
+ * Decode ADSL Forum vendor-specific options.
+ */
+ if ((p[0] == 125) && (p[1] > 6) && (p[2] == 0) && (p[3] == 0) && (p[4] == 0x0d) && (p[5] == 0xe9) &&
+ (p[6] + 5 == p[1])) {
+ da = dict_attrbyvalue(255, 0x0de9);
+ if (!da) goto normal;
+
+ vp = fr_pair_afrom_da(ctx, da);
+ if (!vp) {
+ fr_pair_list_free(out);
+ return -1;
+ }
+
+ (void) fr_dhcp_decode_suboption(ctx, &vp, p + 7, p[6]);
+ if (vp) fr_cursor_merge(&cursor, vp);
+ goto next;
+ }
+
+ normal:
/*
* Array type sub-option create a new VALUE_PAIR
* for each array element.