Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2021 22:02:21 GMT
From:      Lutz Donnerhacke <donner@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 03b0505b8fe8 - main - ip_forward: Restore RFC reference
Message-ID:  <202105222202.14MM2LM3000527@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by donner:

URL: https://cgit.FreeBSD.org/src/commit/?id=03b0505b8fe848f33f2f38fe89dd5538908c847e

commit 03b0505b8fe848f33f2f38fe89dd5538908c847e
Author:     Zhenlei Huang <zlei.huang@gmail.com>
AuthorDate: 2021-05-22 21:53:52 +0000
Commit:     Lutz Donnerhacke <donner@FreeBSD.org>
CommitDate: 2021-05-22 22:01:37 +0000

    ip_forward: Restore RFC reference
    
    Add RFC reference lost in 3d846e48227e2e78c1e7b35145f57353ffda56ba
    
    PR:             255388
    Reviewed By:    rgrimes, donner, karels, marcus, emaste
    MFC after:      27 days
    Differential Revision: https://reviews.freebsd.org/D30374
---
 sys/netinet/ip_input.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 1139e3a5abfa..733cc2901879 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -740,7 +740,10 @@ passin:
 	}
 	if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
 		MROUTER_RLOCK();
-		/* Do not forward packets from IN_LINKLOCAL. */
+		/*
+		 * RFC 3927 2.7: Do not forward multicast packets from
+		 * IN_LINKLOCAL.
+		 */
 		if (V_ip_mrouter && !IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
 			/*
 			 * If we are acting as a multicast router, all
@@ -780,7 +783,7 @@ passin:
 		goto ours;
 	if (ip->ip_dst.s_addr == INADDR_ANY)
 		goto ours;
-	/* Do not forward packets to or from IN_LINKLOCAL. */
+	/* RFC 3927 2.7: Do not forward packets to or from IN_LINKLOCAL. */
 	if (IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr)) ||
 	    IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
 		IPSTAT_INC(ips_cantforward);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105222202.14MM2LM3000527>