ip_forward: Restore RFC reference
Add RFC reference lost in 3d846e4822
PR: 255388
Reviewed By: rgrimes, donner, karels, marcus, emaste
MFC after: 27 days
Differential Revision: https://reviews.freebsd.org/D30374
This commit is contained in:
parent
3f7e14ad93
commit
03b0505b8f
@ -740,7 +740,10 @@ ip_input(struct mbuf *m)
|
|||||||
}
|
}
|
||||||
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
|
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
|
||||||
MROUTER_RLOCK();
|
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 (V_ip_mrouter && !IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
|
||||||
/*
|
/*
|
||||||
* If we are acting as a multicast router, all
|
* If we are acting as a multicast router, all
|
||||||
@ -780,7 +783,7 @@ ip_input(struct mbuf *m)
|
|||||||
goto ours;
|
goto ours;
|
||||||
if (ip->ip_dst.s_addr == INADDR_ANY)
|
if (ip->ip_dst.s_addr == INADDR_ANY)
|
||||||
goto ours;
|
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)) ||
|
if (IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr)) ||
|
||||||
IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
|
IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
|
||||||
IPSTAT_INC(ips_cantforward);
|
IPSTAT_INC(ips_cantforward);
|
||||||
|
Loading…
Reference in New Issue
Block a user