forked from msantos/pkt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rfc4861: encode: fix reserved field size
Fix reserved field size when encoding packet: https://tools.ietf.org/html/rfc4861#section-4.1 Reported in: msantos#44 Thanks @alexshavelev!
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
%% Copyright (c) 2009-2015, Michael Santos <[email protected]> | ||
%% Copyright (c) 2009-2017, Michael Santos <[email protected]> | ||
%% All rights reserved. | ||
%% | ||
%% Redistribution and use in source and binary forms, with or without | ||
|
@@ -96,7 +96,7 @@ codec(#icmp6{ | |
<<Type:8, Code:8, Checksum:16, Id:16, Seq:16>>; | ||
|
||
%% | ||
%% RFC 4681: Neighbor Discovery for IP version 6 (IPv6) | ||
%% RFC 4861: Neighbor Discovery for IP version 6 (IPv6) | ||
%% | ||
|
||
% Router Solicitation Message | ||
|
@@ -109,7 +109,7 @@ codec(#icmp6{ | |
type = ?ND_ROUTER_SOLICIT, code = Code, checksum = Checksum, | ||
res = Res | ||
}) -> | ||
<<?ND_ROUTER_SOLICIT:8, Code:8, Checksum:16, Res:16>>; | ||
<<?ND_ROUTER_SOLICIT:8, Code:8, Checksum:16, Res:32>>; | ||
|
||
% Router Advertisement Message | ||
codec(<<?ND_ROUTER_ADVERT:8, Code:8, Checksum:16, Hop:8, M:1, O:1, Res:6, | ||
|