If I understand PF documentation correctly, then I stumbled onto a bug. 
Through process of elimination and simplification I've determined that 
the following pf.conf(5) snippet works flawlessly, while the one below 
(same thing inside an anchor) does not. How can I [help] track down 
this bug? Conversely, am I missing something and it is working as 
designed?

# works
pass in quick on egress proto { tcp udp } \
        from any to <bait> port 0:65535 \
        divert-packet port 12345 no state

# does NOT work
anchor honeypot {
pass in quick on egress proto { tcp udp } \
        from any to <bait> port 0:65535 \
        divert-packet port 12345 no state
}


The requisite dmesg:

OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
    
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4277927936 (4079MB)
avail mem = 4155265024 (3962MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf9920 (87 entries)
bios0: vendor Dell Computer Corporation version "A07" date 04/25/2008
bios0: Dell Computer Corporation PowerEdge 1850
acpi0 at bios0: rev 0
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC SPCR HPET MCFG SSDT SSDT SSDT
acpi0: wakeup devices PCI0(S5) PALO(S5) PBLO(S5) VPR0(S5) PBHI(S5) 
VPR1(S5) PICH(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(TM) CPU 3.60GHz, 3591.66 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-
CPL,EST,TM2,CNXT-ID,CX16,xTPR,NXE,LONG,PERF
cpu0: 2MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64
cpu1 at mainbus0: apid 6 (application processor)
cpu1: Intel(R) Xeon(TM) CPU 3.60GHz, 3591.24 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-
CPL,EST,TM2,CNXT-ID,CX16,xTPR,NXE,LONG,PERF
cpu1: 2MB 64b/line 8-way L2 cache
cpu1: smt 0, core 0, package 6
ioapic0 at mainbus0: apid 7 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 7
ioapic1 at mainbus0: apid 8 pa 0xfec80000, version 20, 24 pins
ioapic1: misconfigured as apic 0, remapped to apid 8
ioapic2 at mainbus0: apid 9 pa 0xfec83000, version 20, 24 pins
ioapic2: misconfigured as apic 0, remapped to apid 9
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PALO)
acpiprt2 at acpi0: bus 2 (DOBA)
acpiprt3 at acpi0: bus 3 (DOBB)
acpiprt4 at acpi0: bus 4 (PBLO)
acpiprt5 at acpi0: bus 8 (VPR0)
acpiprt6 at acpi0: bus 5 (PBHI)
acpiprt7 at acpi0: bus 6 (PXB1)
acpiprt8 at acpi0: bus 7 (PXB2)
acpiprt9 at acpi0: bus 9 (PICH)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 3591 MHz: speeds: 3600, 3400, 3200, 3000, 2800 
MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel E7520 Host" rev 0x09
ppb0 at pci0 dev 2 function 0 "Intel E7520 PCIE" rev 0x09
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 "Intel IOP332 PCIE-PCIX" rev 0x06
pci2 at ppb1 bus 2
em0 at pci2 dev 12 function 0 "Intel 82546EB" rev 0x01: apic 8 int 7, 
address 00:04:23:d0:a7:a4
em1 at pci2 dev 12 function 1 "Intel 82546EB" rev 0x01: apic 8 int 4, 
address 00:04:23:d0:a7:a5
ami0 at pci2 dev 14 function 0 "Dell PERC 4e/Di" rev 0x06: apic 8 int 
14
ami0: Dell 16c, 32b, FW 5B2D, BIOS vH435, 256MB RAM
ami0: 1 channels, 0 FC loops, 1 logical drives
scsibus1 at ami0: 40 targets
sd0 at scsibus1 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct 
fixed
sd0: 17280MB, 512 bytes/sector, 35389440 sectors
scsibus2 at ami0: 16 targets
safte0 at scsibus2 targ 6 lun 0: <PE/PV, 1x2 SCSI BP, 1.0> SCSI2 
3/processor fixed
ppb2 at pci1 dev 0 function 2 "Intel IOP332 PCIE-PCIX" rev 0x06
pci3 at ppb2 bus 3
ppb3 at pci0 dev 4 function 0 "Intel E7520 PCIE" rev 0x09
pci4 at ppb3 bus 4
ppb4 at pci0 dev 5 function 0 "Intel E7520 PCIE" rev 0x09
pci5 at ppb4 bus 5
ppb5 at pci5 dev 0 function 0 "Intel 6700PXH PCIE-PCIX" rev 0x09
pci6 at ppb5 bus 6
em2 at pci6 dev 7 function 0 "Intel 82541GI" rev 0x05: apic 9 int 0, 
address 00:11:43:e4:c4:63
ppb6 at pci5 dev 0 function 2 "Intel 6700PXH PCIE-PCIX" rev 0x09
pci7 at ppb6 bus 7
em3 at pci7 dev 8 function 0 "Intel 82541GI" rev 0x05: apic 9 int 1, 
address 00:11:43:e4:c4:64
ppb7 at pci0 dev 6 function 0 "Intel E7520 PCIE" rev 0x09
pci8 at ppb7 bus 8
uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: apic 7 
int 16
uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: apic 7 
int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: apic 7 
int 18
ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: apic 
7 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb8 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xc2
pci9 at ppb8 bus 9
"Dell DRAC 4" rev 0x00 at pci9 dev 5 function 0 not configured
puc0 at pci9 dev 5 function 1 "Dell DRAC 4 Virtual UART" rev 0x00: 
ports: 1 com
com4 at puc0 port 0 apic 7 int 21: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
"Dell DRAC 4 SMIC" rev 0x00 at pci9 dev 5 function 2 not configured
pciide0 at pci9 dev 6 function 0 "CMD Technology PCI0680" rev 0x02
pciide0: bus-master DMA support present
pciide0: channel 0 wired to native-PCI mode
pciide0: using apic 7 int 23 for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus3 at atapiscsi0: 2 targets
sd1 at scsibus3 targ 0 lun 0: <DELL, VSF, 0123> ATAPI 0/direct 
removable
atapiscsi1 at pciide0 channel 0 drive 1
scsibus4 at atapiscsi1: 2 targets
cd0 at scsibus4 targ 0 lun 0: <DELL, VCD, 0133> ATAPI 5/cdrom removable
sd1(pciide0:0:0): using PIO mode 3
cd0(pciide0:0:1): using PIO mode 3
pciide0: channel 1 wired to native-PCI mode
radeondrm0 at pci9 dev 13 function 0 "ATI Radeon VE" rev 0x00
drm0 at radeondrm0
radeondrm0: apic 7 int 18
pcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02
pciide1 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02: DMA, 
channel 0 configured to compatibility, channel 1 configured to 
compatibility
atapiscsi2 at pciide1 channel 0 drive 0
scsibus5 at atapiscsi2: 2 targets
cd1 at scsibus5 targ 0 lun 0: <HL-DT-ST, CDRW/DVD GCC4244, B101> ATAPI 
5/cdrom removable
cd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide1: channel 1 disabled (no drives)
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
uhub4 at uhub0 port 3 "Dell product 0xa001" rev 2.00/0.00 addr 2
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Dell DRAC4" rev 
1.10/0.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub1 port 1 configuration 1 interface 1 "Dell DRAC4" rev 
1.10/0.00 addr 2
uhidev1: iclass 3/1
ums0 at uhidev1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
vscsi0 at root
scsibus6 at vscsi0: 256 targets
softraid0 at root
scsibus7 at softraid0: 256 targets
root on sd0a (d017d8c1e9fc5f44.a) swap on sd0b dump on sd0b
drm: initializing kernel modesetting (RV100 0x1002:0x5159 
0x1028:0x016C).
radeondrm0: VRAM: 128M 0x00000000C8000000 - 0x00000000CFFFFFFF (16M 
used)
radeondrm0: GTT: 512M 0x00000000A8000000 - 0x00000000C7FFFFFF
drm: PCI GART of 512M enabled (table at 0x0000000008CC1000).
error: [drm:pid0:r100_cp_init_microcode] *ERROR* radeon_cp: Failed to 
load firmware "radeon-r100_cp"
error: [drm:pid0:r100_cp_init] *ERROR* Failed to load firmware!
error: [drm:pid0:r100_startup] *ERROR* failed initializing CP (-2).
error: [drm:pid0:r100_init] *ERROR* Disabling GPU acceleration
drm: radeon: cp finalized
drm: No TV DAC info found in BIOS
radeondrm0: 1024x768
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using 
wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Reply via email to