Re: Updating PF to OpenBSD Release 4,1

看板DFBSD_kernel作者時間15年前 (2010/05/15 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/14 (看更多)
On 13/05/2010 07:14 弮弮, Jan Lentfer wrote: > I am trying (and I mean >trying<) to update our version of PF to the PF > in OpenBSD 4.1. I have hit one obstacle (many more to come I am sure) I > don't know how to solve: > > In sys/net/pf/if_pflog.c in function pflog_packet() we used to have > BPF_MTAP(ifn, &m1); > > in OpenBSD 3.5 (which our version is based on) this was: > bpf_mtap(ifn->if_bpf, &m1); > > In OpenBSD 4.1 this changed to: > bpf_mtap_hdr(ifn->if_bpf, (char *)&hdr, PFLOG_HDRLEN, m, > BPF_DIRECTION_OUT); What happens is that for the pflog interface we add an additional header to the packet (pfloghdr). OpenBSD has bpf_mtap_hdr() to do that, FreeBSD probably uses BPF_MTAP2() for the same purpose. We just opencode the thing in pflog_packet(). I think we should import one of the two implementations (I haven't looked at the FreeBSD source). I much, much, prefer the OpenBSD name. HTH, Aggelos
文章代碼(AID): #1BxO_ouR (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1BxO_ouR (DFBSD_kernel)