Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
bc80ce57
Commit
bc80ce57
authored
Apr 25, 2016
by
Francis Dupont
Browse files
[4268a] Padded hlen/htype pkt4
parent
18542d6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/eval/token.cc
View file @
bc80ce57
...
...
@@ -163,11 +163,19 @@ TokenPkt4::evaluate(const Pkt& pkt, ValueStack& values) {
break
;
case
HLEN
:
binary
.
assign
(
1
,
pkt4
.
getHlen
());
// Pad the uint8_t field to 4 bytes.
binary
.
push_back
(
0
);
binary
.
push_back
(
0
);
binary
.
push_back
(
0
);
binary
.
push_back
(
pkt4
.
getHlen
());
break
;
case
HTYPE
:
binary
.
assign
(
1
,
pkt4
.
getHtype
());
// Pad the uint8_t field to 4 bytes.
binary
.
push_back
(
0
);
binary
.
push_back
(
0
);
binary
.
push_back
(
0
);
binary
.
push_back
(
pkt4
.
getHtype
());
break
;
default:
...
...
src/lib/eval/token.h
View file @
bc80ce57
...
...
@@ -299,8 +299,8 @@ protected:
/// - ciaddr (client IP address, 4 octets)
/// - yiaddr ('your' (client) IP address, 4 octets)
/// - siaddr (next server IP address, 4 octets)
/// - hlen (hardware address length,
1
octet)
/// - htype (hardware address type,
1
octet)
/// - hlen (hardware address length,
padded to 4
octet
s
)
/// - htype (hardware address type,
padded to 4
octet
s
)
class
TokenPkt4
:
public
Token
{
public:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment