Hello guys, Theo, first you are doing an incredible job with OpenBSD, it's really amazing, thank you.
My name is Roman, I am running OpenBSD 4.5 firewall in Russia, St. Petersburg, but I actually am Canadian currently in Germany. I decided to update the whole thing and ran into a compilation error. I am using this machine: http://www.ibt.ca/v2/items/fwa9206/ I got the source of one of the anonymous servers ([email protected]:/cvs), just did a clean check out of revision 4_5 (this is the version that was originally installed on the firewall) #cd /usr/src/sys/arch/i386/conf #/usr/sbin/config GENERIC #cd /usr/src/sys/arch/i386/compile/GENERIC #make clean && make depend && make This is the error: 6 -c ../../../../dev/ksyms.c cc -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized -Wno-format -Wno-main -Wstack-larger-than-2047 -fno-builtin-printf -fno-builtin-log -O2 -pipe -nostdinc -I. -I../../../.. -I../../../../arch -DDDB -DDIAGNOSTIC -DKTRACE -DACCOUNTING -DKMEMSTATS -DPTRACE -DCRYPTO -DSYSVMSG -DSYSVSEM -DSYSVSHM -DUVM_SWAP_ENCRYPT -DCOMPAT_43 -DCOMPAT_O43 -DLKM -DFFS -DFFS2 -DFFS_SOFTUPDATES -DUFS_DIRHASH -DQUOTA -DEXT2FS -DMFS -DXFS -DTCP_SACK -DTCP_ECN -DTCP_SIGNATURE -DNFSCLIENT -DNFSSERVER -DCD9660 -DUDF -DMSDOSFS -DFIFO -DINET -DALTQ -DINET6 -DIPSEC -DPPP_BSDCOMP -DPPP_DEFLATE -DMROUTING -DBOOT_CONFIG -DUSER_PCICONF -DKVM86 -DUSER_LDT -DAPERTURE -DCOMPAT_SVR4 -DCOMPAT_IBCS2 -DCOMPAT_LINUX -DCOMPAT_FREEBSD -DCOMPAT_BSDOS -DCOMPAT_AOUT -DPROCFS -DPCIVERBOSE -DEISAVERBOSE -DUSBVERBOSE -DWSDISPLAY_COMPAT_USL -DWSDISPLAY_COMPAT_RAWKBD -DWSDISPLAY_DEFAULTSCREENS="6" -DWSDISPLAY_COMPAT_PCVT -DONEWIREVERBOSE -D_KERNEL -Di386 -c ../../../../net/pf.c ../../../../net/pf.c: In function `pf_test6': ../../../../net/pf.c:5641: error: duplicate case value ../../../../net/pf.c:5616: error: previously used here ../../../../net/pf.c:5786: error: case label not within a switch statement *** Error code 1 Stop in /usr/src/sys/arch/i386/compile/GENERIC (line 92 of /usr/share/mk/sys.mk). I do not have physical access to the machine right now, only over ssh and I updated the rest of the patches successfully except for the kernel updates. I wonder if anybody can tell me if this problem is real in the code or just mine? I looked at the code at 5641 #ifdef INET6 case IPPROTO_ICMPV6: { action = PF_DROP; DPFPRINTF(PF_DEBUG_MISC, ("pf: dropping IPv4 packet with ICMPv6 payload\n")); goto done; } #endif I commented out these lines and tried compiling again. It failed once more ../../../../net/pf.c ../../../../net/pf.c: In function `pf_test6': ../../../../net/pf.c:5786: error: case label not within a switch statement *** Error code 1 If I am reading my brackets right, then it is true, there is a switch statement and a case outside of the switch there: switch (action) { case PF_SYNPROXY_DROP: m_freem(*m0); case PF_DEFER: *m0 = NULL; action = PF_PASS; break; default: /* pf_route6 can free the mbuf causing *m0 to become NULL */ if (r->rt) pf_route6(m0, r, dir, kif->pfik_ifp, s, &pd); break; } case IPPROTO_ICMP: { action = PF_DROP; DPFPRINTF(PF_DEBUG_MISC, ("pf: dropping IPv6 packet with ICMPv4 payload\n")); goto done; } I commented out the "case IPPROTO_ICMP: " - and its scope and tried building once again. It WORKED. The Kernel was built this time without PF errors 6 -c vers.c rm -f bsd ld -Ttext 0xD0200120 -e start -N --warn-common -S -x -o bsd ${SYSTEM_OBJ} vers.o text data bss dec hex 5878156 158396 1059780 7096332 6c480c #ls -lart bsd #-rwxr-xr-x 1 root wsrc 6696236 Jun 13 01:57 bsd but I am completely uncomfortable with what I have done here and I can't install that kernel because I don't understand what the implications are or why this has happened. The following is the dmesg output from this firewall: $ dmesg OpenBSD 4.5 (GENERIC.MP) #108: Sat Feb 28 14:58:58 MST 2009 [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP cpu0: Intel(R) Celeron(R) CPU 2.80GHz ("GenuineIntel" 686-class) 2.81 GHz cpu0: FPU,V86,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,SBF,SSE3,MWAIT,DS-CPL,TM2,CNXT-ID,CX16,xTPR real mem = 1064923136 (1015MB) avail mem = 1021415424 (974MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 03/03/06, BIOS32 rev. 0 @ 0xfb380, SMBIOS rev. 2.2 @ 0xf0800 (39 entries) bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 03/03/2006 acpi at bios0 function 0x0 not configured mpbios0 at bios0: Intel MP Specification 1.4 cpu0 at mainbus0: apid 0 (boot processor) cpu0: apic clock running at 133MHz mpbios0: bus 0 is type PCI mpbios0: bus 1 is type PCI mpbios0: bus 2 is type PCI mpbios0: bus 3 is type PCI mpbios0: bus 4 is type PCI mpbios0: bus 5 is type PCI mpbios0: bus 6 is type ISA ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins pcibios0 at bios0: rev 3.0 @ 0xf0000/0xde04 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdca0/304 (17 entries) pcibios0: bad IRQ table checksum pcibios0: PCI BIOS has 20 Interrupt Routing table entries pcibios0: PCI Exclusive IRQs: 9 10 11 12 15 pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801FB LPC" rev 0x00) pcibios0: PCI bus #5 is the last bus bios0: ROM list: 0xc0000/0xa600! 0xef000/0x1000! pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82915G Host" rev 0x0e vga1 at pci0 dev 2 function 0 "Intel 82915G Video" rev 0x0e wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0xd0000000, size 0x10000000 inteldrm0 at vga1: apic 2 int 16 (irq 9) drm0 at inteldrm0 ppb0 at pci0 dev 28 function 0 "Intel 82801FB PCIE" rev 0x03: apic 2 int 16 (irq 9) pci1 at ppb0 bus 1 mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x19, Yukon-2 EC rev. A3 (0x2): apic 2 int 16 (irq 9) msk0 at mskc0 port A: address 00:03:2d:0a:b7:42 eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2 ppb1 at pci0 dev 28 function 1 "Intel 82801FB PCIE" rev 0x03: apic 2 int 17 (irq 15) pci2 at ppb1 bus 2 mskc1 at pci2 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x19, Yukon-2 EC rev. A3 (0x2): apic 2 int 17 (irq 15) msk1 at mskc1 port A: address 00:03:2d:0a:b7:43 eephy1 at msk1 phy 0: 88E1111 Gigabit PHY, rev. 2 ppb2 at pci0 dev 28 function 2 "Intel 82801FB PCIE" rev 0x03: apic 2 int 18 (irq 11) pci3 at ppb2 bus 3 mskc2 at pci3 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x19, Yukon-2 EC rev. A3 (0x2): apic 2 int 18 (irq 11) msk2 at mskc2 port A: address 00:03:2d:0a:b7:44 eephy2 at msk2 phy 0: 88E1111 Gigabit PHY, rev. 2 ppb3 at pci0 dev 28 function 3 "Intel 82801FB PCIE" rev 0x03: apic 2 int 19 (irq 15) pci4 at ppb3 bus 4 mskc3 at pci4 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x19, Yukon-2 EC rev. A3 (0x2): apic 2 int 19 (irq 15) msk3 at mskc3 port A: address 00:03:2d:0a:b7:45 eephy3 at msk3 phy 0: 88E1111 Gigabit PHY, rev. 2 uhci0 at pci0 dev 29 function 0 "Intel 82801FB USB" rev 0x03: apic 2 int 23 (irq 11) uhci1 at pci0 dev 29 function 1 "Intel 82801FB USB" rev 0x03: apic 2 int 19 (irq 15) uhci2 at pci0 dev 29 function 2 "Intel 82801FB USB" rev 0x03: apic 2 int 18 (irq 11) uhci3 at pci0 dev 29 function 3 "Intel 82801FB USB" rev 0x03: apic 2 int 16 (irq 9) ehci0 at pci0 dev 29 function 7 "Intel 82801FB USB" rev 0x03: apic 2 int 23 (irq 11) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb4 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xd3 pci_intr_map: bus 0 dev 30 func 0 pin 1; line 15 pci_intr_map: no MP mapping found pci_intr_map: bus 0 dev 30 func 0 pin 2; line 12 pci_intr_map: no MP mapping found pci5 at ppb4 bus 5 em0 at pci5 dev 0 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: apic 2 int 20 (irq 12), address 00:03:2d:0a:b7:40 em1 at pci5 dev 1 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05: apic 2 int 21 (irq 10), address 00:03:2d:0a:b7:41 ichpcib0 at pci0 dev 31 function 0 "Intel 82801FB LPC" rev 0x03: PM disabled pciide0 at pci0 dev 31 function 2 "Intel 82801FB SATA" rev 0x03: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI pciide0: using apic 2 int 19 (irq 0) for native-PCI interrupt wd0 at pciide0 channel 0 drive 0: <ST3500630AS> wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 ichiic0 at pci0 dev 31 function 3 "Intel 82801FB SMBus" rev 0x03: apic 2 int 19 (irq 15) iic0 at ichiic0 lm1 at iic0 addr 0x2c: W83792D rev D spdmem0 at iic0 addr 0x50: 1GB DDR SDRAM non-parity PC3200CL3.0 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 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at ichpcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com1 at isa0 port 0x2f8/8 irq 3: 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, using wsdisplay0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 wbsio0 at isa0 port 0x4e/2: W83627HF rev 0x41 lm2 at wbsio0 port 0x290/8: W83627HF npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 mtrr: Pentium Pro MTRR support softraid0 at root root on wd0a swap on wd0b dump on wd0b $ Guys, I totally want to help here, though I am not sure if there is much more I can do, I don't know the OpenBSD code. However if you can tell me what to do, I'll do it to help. But can you tell me if this is a real bug at all? Thank you very much, Roman Mironenko 416 895 5744
