Page MenuHomeFreeBSD

ip6_input: remove redundant v4mapped check
ClosedPublic

Authored by bz on Nov 20 2019, 6:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 27 2024, 4:39 AM
Unknown Object (File)
Dec 20 2023, 7:09 AM
Unknown Object (File)
Dec 5 2023, 6:06 PM
Unknown Object (File)
Oct 24 2023, 9:33 AM
Unknown Object (File)
Oct 12 2023, 6:54 PM
Unknown Object (File)
Oct 12 2023, 12:52 AM
Unknown Object (File)
Aug 19 2023, 8:47 PM
Unknown Object (File)
Jul 30 2023, 12:06 AM

Details

Summary

In ip6_input() we apply the same v4mapped address check twice. The only
case which skipps the first one is M_FASTFWD_OURS which should have passed
the check on the firstinput pass and passed the firewall.
Remove the 2nd redundant check.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 27660
Build 25864: arc lint + arc unit

Event Timeline

melifaro added a subscriber: melifaro.

LGTM.

Just for the logging purposes, the timeline looked like this:

  1. 21 Dec 1999: Introduction of the first block "be paranoid about malicious use of v4 mapped addr on v6 packet.)"
  2. 21 Mar 2000: Disable block1 "remove strong check against IPv4 compatible address. this (wrongly) forbids RFC1933 relaying case.."
  3. 28 Mar 2000: Move block1 to block2 "SIIT assumes that routers forward native IPv6 packet with IPv4 mapped address just like for normal packets. move IPv4 mapped address src/dst check downwards."
  4. 26 Jul 2000: Add block1 back "reject IPv6 traffic, with IPv4 mapped address in the header. the code was removed once, but in a second thought, it makes more sense as we cannot live in SIIT environment anyways. see comments for detail."

Btw, don't we want to update block1 comments as well?
"This check chokes if we are in an SIIT cloud. As none of BSDs support IPv4-less kernel compilation, ..." ? :-)

This revision is now accepted and ready to land.Dec 2 2019, 7:29 PM
This revision was automatically updated to reflect the committed changes.