mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 04:11:35 +01:00
Several classes now use PDUOption::length_field instead of data_size.
This commit is contained in:
@@ -321,7 +321,7 @@ uint8_t* IP::write_option(const ip_option &opt, uint8_t* buffer) {
|
||||
option_identifier opt_type = opt.option();
|
||||
memcpy(buffer, &opt_type, 1);
|
||||
buffer++;
|
||||
*(buffer++) = opt.data_size() + 2;
|
||||
*(buffer++) = opt.length_field() + 2;
|
||||
std::copy(opt.data_ptr(), opt.data_ptr() + opt.data_size(), buffer);
|
||||
buffer += opt.data_size();
|
||||
return buffer;
|
||||
|
||||
Reference in New Issue
Block a user