|
@@ -1064,7 +1064,7 @@ TEST_F(Pkt6Test, getMACFromIPv6RelayOpt_singleRelay) {
|
|
|
Pkt6::RelayInfo info;
|
|
|
|
|
|
// generate options with code 79 and client link layer address
|
|
|
- const char opt_data[] = {
|
|
|
+ const uint8_t opt_data[] = {
|
|
|
0x00, 0x01, // Ethertype
|
|
|
0x0a, 0x1b, 0x0b, 0x01, 0xca, 0xfe // MAC
|
|
|
};
|
|
@@ -1093,11 +1093,11 @@ TEST_F(Pkt6Test, getMACFromIPv6RelayOpt_multipleRelay) {
|
|
|
// Now pretend it was relayed two times. The relay closest to the server
|
|
|
// adds link-layer-address information against the RFC, the process fails.
|
|
|
Pkt6::RelayInfo info1;
|
|
|
- char opt_data[] = {
|
|
|
+ uint8_t opt_data[] = {
|
|
|
0x00, 0x01, // Ethertype
|
|
|
0x1a, 0x30, 0x0b, 0xfa, 0xc0, 0xfe // MAC
|
|
|
};
|
|
|
- OptionPtr relay_opt1(new Option(Option::V6, 79,
|
|
|
+ OptionPtr relay_opt1(new Option(Option::V6, D6O_CLIENT_LINKLAYER_ADDR,
|
|
|
OptionBuffer(opt_data, opt_data + sizeof(opt_data))));
|
|
|
|
|
|
info1.options_.insert(make_pair(relay_opt1->getType(), relay_opt1));
|
|
@@ -1113,9 +1113,10 @@ TEST_F(Pkt6Test, getMACFromIPv6RelayOpt_multipleRelay) {
|
|
|
// Let's envolve the packet with a third relay (now the closest to the client)
|
|
|
// that inserts the correct client_linklayer_addr option.
|
|
|
Pkt6::RelayInfo info3;
|
|
|
+
|
|
|
// We reuse the option and modify the MAC to be sure we get the right address
|
|
|
opt_data[2] = 0xfa;
|
|
|
- OptionPtr relay_opt3(new Option(Option::V6, 79,
|
|
|
+ OptionPtr relay_opt3(new Option(Option::V6, D6O_CLIENT_LINKLAYER_ADDR,
|
|
|
OptionBuffer(opt_data, opt_data + sizeof(opt_data))));
|
|
|
info3.options_.insert(make_pair(relay_opt3->getType(), relay_opt3));
|
|
|
pkt.addRelayInfo(info3);
|