return -1;
}
- /*
- * If chaddr != 6 bytes it's probably not ethernet, and we should store
- * it as an opaque type (octets).
- */
- if (da == attr_dhcp_client_hardware_address) {
- /*
- * Skip chaddr if it doesn't exist.
- */
- if ((data[1] == 0) || (data[2] == 0)) continue;
-
- if ((data[1] == 1) && (data[2] != sizeof(vp->vp_ether))) {
- fr_pair_to_unknown(vp);
- }
- }
-
switch (vp->vp_type) {
case FR_TYPE_STRING:
/*
if (vp->vp_length == 0) TALLOC_FREE(vp);
break;
- case FR_TYPE_OCTETS:
- if (data[2] == 0) break;
-
- fr_pair_value_memdup(vp, p, data[2], true);
- break;
-
/*
* The DHCP header size for CHADDR is not
* 6, so the value_box function doesn't
* like it. Just do the copy manually.
*/
case FR_TYPE_ETHERNET:
+ if ((data[1] != 1) || (data[2] != 6)) {
+ TALLOC_FREE(vp);
+ break;
+ }
+
memcpy(vp->vp_ether, p, sizeof(vp->vp_ether));
break;
match raw.V-I-Vendor-Specific = 0x
decode-proto 03 00 00 f5 00 11 41 04 04 04 04 04 29 04 04 00 04 ca 04 04 04 09 04 04 1a f3 ff 7e a0 b5 25 07 80 3b 60 00 00 1a 23 00 00 fd 00 80 00 00 00 00 00 10 00 80 00 00 00 00 00 00 2f 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 ca 04 04 04 04 04 04 1a 0d 00 00 60 b5 25 07 2b 35 60 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 11 00 00 00 00 00 32 60 1a 00 08 0d 00 00 60 b5 00 00 00 25 21 39 21 1a 0d 00 00 60 b5 25 07 80 34 60 00 00 1a 0d 00 00 60 b5 25 2a 60 00 31 00 80 1a 0d 00 00 60 b5 25 07 80 34 21 21 04 1a 0d 00 00 60 63 82 53 63 f2 60 b5 25 07 80 31 60 00 00 1a 29 00 00 00 f8 ff ff fc 00 00 00 00 00 00 04 00 00 00 d6 00 00 5d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 ca 04 04 04 04 04 04 1a 0d 00 00 60 b5 25 07 80 34 65 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 1a 0d 00 00 20 b5 25 07 80 35 2f 04 00 00 00 00 ff fb 00 00 00 00 00 00 00 00 00 00 00 04 00 04 0d 7a 7a 7a 7a 00 10 00 00 00 00 00 00 d5 10 00 00 00 00 00 00 00 00 00 02 00 7d 00 00 00 00 00
-match Opcode = 3, Hardware-Type = 0, Hardware-Address-Length = 0, Hop-Count = 245, Transaction-Id = 1130756, Number-of-Seconds = 1028, Flags = 1028, Client-IP-Address = 41.4.4.0, Your-IP-Address = 4.202.4.4, Server-IP-Address = 4.9.4.4, Gateway-IP-Address = 26.243.255.126, Server-Host-Name = "\240\265\%\a\200;`", Site-specific-18 = 0xb5250780316000001a29000000f8fffffc00000000000004000000d600005d000000000000000000000000000000000000000000000004ca0404040404041a0d000060b5250780346500001a00000000000000000000001a0d000020b5250780, raw.Message-Type = 0x0400000000fffb00000000000000000000000400040d7a7a7a7a0010000000000000d5100000000000000000000200, raw.V-I-Vendor-Specific = 0x, Network-Subnet = 26.243.255.126/32
+match Opcode = 3, Hardware-Type = 0, Hardware-Address-Length = 0, Hop-Count = 245, Transaction-Id = 1130756, Number-of-Seconds = 1028, Flags = 1028, Client-IP-Address = 41.4.4.0, Your-IP-Address = 4.202.4.4, Server-IP-Address = 4.9.4.4, Gateway-IP-Address = 26.243.255.126, Boot-Filename = "\004\004\004\004\032\r", Site-specific-18 = 0xb5250780316000001a29000000f8fffffc00000000000004000000d600005d000000000000000000000000000000000000000000000004ca0404040404041a0d000060b5250780346500001a00000000000000000000001a0d000020b5250780, raw.Message-Type = 0x0400000000fffb00000000000000000000000400040d7a7a7a7a0010000000000000d5100000000000000000000200, raw.V-I-Vendor-Specific = 0x, Network-Subnet = 26.243.255.126/32
decode-pair 76 03 01 02 03
match raw.Subnet-Selection-Option = 0x010203