Skip to content

Commit

Permalink
lib.ipsec.esp: correct bogus note about IP fragment handling
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Apr 12, 2018
1 parent bb72e66 commit 53ae8bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/lib/ipsec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ transport modes. Currently, the only supported cipher is AES-GCM cipher with
128‑bit keys, 4 bytes of salt, and a 12 byte authentication code. These classes
do not implement any key exchange protocol.

Note: the classes in this module do not reject IP fragments of any sort.

References:

- [IPsec Wikipedia page](https://en.wikipedia.org/wiki/IPsec).
Expand Down
10 changes: 3 additions & 7 deletions src/lib/ipsec/esp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ module(...,package.seeall)
-- it is assumed to be an unrealistic scenario as it would take 584 years to
-- overflow the counter when transmitting 10^9 packets per second.
--
-- * decapsulate_transport6: Rejection of IP fragments is *not* implemented
-- because `lib.protocol.ipv6' does not support fragmentation. E.g.
-- fragments will be rejected because they can not be parsed as IPv6
-- packets. If however `lib.protocol.ipv6' were to be updated to be able to
-- parse IP fragments this implementation would have to be updated as well
-- to remain correct. See the “Reassembly” section of RFC 4303 for details:
-- * IP fragments are *not* rejected by the routines in this library, and are
-- expected to be handled prior to encapsulation/decapsulation.
-- See the “Reassembly” section of RFC 4303 for details:
-- https://tools.ietf.org/html/rfc4303#section-3.4.1
--

local header = require("lib.protocol.header")
local datagram = require("lib.protocol.datagram")
Expand Down

0 comments on commit 53ae8bd

Please sign in to comment.