Re: git: kernel - network protocol thread routing

看板DFBSD_commit作者時間15年前 (2010/09/09 17:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
On Thu, Sep 9, 2010 at 4:35 PM, Matthew Dillon <dillon@crater.dragonflybsd.org> wrote: > > commit 6a704092ee2b3384906df96bf4b66575a12f38e2 > Author: Matthew Dillon <dillon@apollo.backplane.com> > Date: ꀠThu Sep 9 01:32:07 2010 -0700 > > ꀠ溆ernel - network protocol thread routing > > ꀠꀪ ip_input() now calls ip_mport() unconditionally and physically compares > ꀠꀠ濳he port to &curthread->td_msgport. 啱f they do not match the packet > ꀠꀠ烀ill be forwarded to the correct protocol thread. > @@ -610,7 +625,6 @@ iphack: return; } if (m->m_pkthdr.fw_flags & FW_MBUF_REDISPATCH) { - needredispatch = TRUE; m->m_pkthdr.fw_flags &= ~FW_MBUF_REDISPATCH; } pass: @@ -866,8 +880,6 @@ ours: /* Get the header length of the reassembled packet */ hlen = IP_VHL_HL(ip->ip_vhl) << 2; - - needredispatch = TRUE; } else { ip->ip_len -= hlen; } I think we still need the 'needredispatch' flag. e.g. after ip defrag (fragments are default to netisr0) and NAT. Following code probably should be put before (port != &curthread->td_msgport): if (needredispatch) { ip->ip_off = htons(ip->ip_off); ip->ip_len = htons(ip->ip_len + hlen); port = ip_mport_in(&m); if (port == NULL) return; ip = mtod(m, struct ip *); ip->ip_len = ntohs(ip->ip_len) - hlen; ip->ip_off = ntohs(ip->ip_off); } if (port != &curthread->td_msgport) { ... } Best Regards, sephe -- Live Free or Die
文章代碼(AID): #1CYA9I5b (DFBSD_commit)
文章代碼(AID): #1CYA9I5b (DFBSD_commit)