Page MenuHomeFreeBSD

D29968.id88154.diff
No OneTemporary

D29968.id88154.diff

diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -736,14 +736,9 @@
}
ia = NULL;
}
- /* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */
- if (IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr))) {
- IPSTAT_INC(ips_cantforward);
- m_freem(m);
- return;
- }
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
- if (V_ip_mrouter) {
+ /* RFC 3927 2.7: Do not forward datagrams 169.254.0.0/16 */
+ if (V_ip_mrouter && !IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
/*
* If we are acting as a multicast router, all
* incoming multicast packets are passed to the
@@ -779,6 +774,14 @@
if (ip->ip_dst.s_addr == INADDR_ANY)
goto ours;
+ /* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */
+ if (IN_LINKLOCAL(ntohl(ip->ip_src.s_addr)) ||
+ IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr))) {
+ IPSTAT_INC(ips_cantforward);
+ m_freem(m);
+ return;
+ }
+
/*
* Not for us; forward if possible and desirable.
*/

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 5, 1:10 PM (3 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34710794
Default Alt Text
D29968.id88154.diff (1014 B)

Event Timeline