From 31e2e88c27c01caed44b558ec3d43341171ba5fe Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Mon, 6 Apr 2015 19:08:44 +0000 Subject: [PATCH] Remove duplicate code We'll just fall into the same local delivery block under the 'if (m->m_flags & M_FASTFWD_OURS)'. Suggested by: ae Differential Revision: https://reviews.freebsd.org/D2225 Approved by: gnn (mentor) --- sys/netinet6/ip6_forward.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index d66b6745896e..e79babac27c7 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -537,22 +537,9 @@ ip6_forward(struct mbuf *m, int srcrt) if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { m->m_flags |= M_SKIP_FIREWALL; /* If destination is now ourself drop to ip6_input(). */ - if (in6_localip(&ip6->ip6_dst)) { + if (in6_localip(&ip6->ip6_dst)) m->m_flags |= M_FASTFWD_OURS; - if (m->m_pkthdr.rcvif == NULL) - m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; - m->m_pkthdr.csum_data = 0xffff; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) - m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; -#endif - error = netisr_queue(NETISR_IPV6, m); - goto out; - } else + else goto again; /* Redo the routing table lookup. */ }