map: ip4-map-t more RFC compliant 42/24342/6
authorVladimir Ratnikov <vratnikov@netgate.com>
Tue, 14 Jan 2020 14:48:31 +0000 (09:48 -0500)
committerOle Trøan <otroan@employees.org>
Tue, 28 Jan 2020 08:14:36 +0000 (08:14 +0000)
commit0d4a61216c2329eec5167d0411481431037ac5c1
treee58415cb89d3603b03f67904d7b0467e6b185e16
parente9595dba26b32abb673f74b777429ae5640dc325
map: ip4-map-t more RFC compliant

When MTU is not set, ignore_df and mtu check
always returns true and packets are dropped.
This patch puts MTU checks after it was
compared with 0 and set to maximum if not set.
Added trace node.

If MTU is less than the total length value of
the IPv4 packet plus 20, the translator MUST
send an ICMPv4 "Fragmentation Needed" error message
to the IPv4 source address

Type: fix
Fixes: 87663cdf644fb7c94c0fec9460829b7e4e7c35ca

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I35b99bc2648984cdbf5b6a57ddec91c586b15bef
src/plugins/map/ip4_map_t.c