diff options
author | hsu <hsu@FreeBSD.org> | 2004-03-08 07:47:27 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2004-03-08 07:47:27 +0000 |
commit | 01e90a548b5f067e622ac698d422f0ef5fc67074 (patch) | |
tree | 7353096e71a4fdfab5a38cbfd1a0b3ee975e4dca | |
parent | ef9b350961dd09267bcb8819c28f47e5c68e3a1c (diff) | |
download | FreeBSD-src-01e90a548b5f067e622ac698d422f0ef5fc67074.zip FreeBSD-src-01e90a548b5f067e622ac698d422f0ef5fc67074.tar.gz |
To comply with the spec, do not copy the TOS from the outer IP
header to the inner IP header of the PIM Register if this is a PIM
Null-Register message.
Submitted by: Pavlin Radoslavov <pavlin@icir.org>
-rw-r--r-- | sys/netinet/ip_mroute.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 83f4aa3..7d7d04b 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -3288,7 +3288,11 @@ pim_input(struct mbuf *m, int off) m_freem(m); return; } - + + /* If a NULL_REGISTER, pass it to the daemon */ + if ((ntohl(*reghdr) & PIM_NULL_REGISTER)) + goto pim_input_to_daemon; + /* * Copy the TOS from the outer IP header to the inner IP header. */ @@ -3308,11 +3312,7 @@ pim_input(struct mbuf *m, int off) m->m_data -= (iphlen + PIM_MINLEN); m->m_len += (iphlen + PIM_MINLEN); } - - /* If a NULL_REGISTER, pass it to the daemon */ - if ((ntohl(*reghdr) & PIM_NULL_REGISTER)) - goto pim_input_to_daemon; - + /* * Decapsulate the inner IP packet and loopback to forward it * as a normal multicast packet. Also, make a copy of the |