Re: carp ipv6 ndp issue

2011-08-08 Thread Florian Fuessl
Alexander Bluhm wrote Monday, August 08, 2011 10:50 AM
> On Sun, Aug 07, 2011 at 04:02:32AM +0200, Florian Fuessl wrote:
> > Alexander Bluhm  wrote Sat., Aug. 06, 2011
> > > On Sat, Aug 06, 2011 at 12:47:27AM +0200, Alexander Bluhm wrote:
> > > > To trigger the bug, you need two adresses in the same network on
> > > > the carp and on the parent interface.  One of them has the route,
> > > > the other cannot do ndp.
> >
> > Thank you. This patch works like a charm! :-)
> 
> By thinking about it, I found another bug with carp and neighbor
> discovery.  When you have two carp interfaces on one physical
> interface and the same prefix on both carp interfaces but not on
> the physical, neighbor discovery will fail for one fo the carp
> interfaces.

Running "the simple the carp setup" this updated patch also runs fine, here.

> I don't know wether this is a common use case.
> 
> It is easy to fix.  When comparing two carp interfaces, assume they
> have same prefixes if they have the same parent.
> 
> ok?
> Can this go into 5.0?

+1

> bluhm

Thank you,
-Florian

> Index: netinet6/in6.c
> ===
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6.c,v
> retrieving revision 1.92
> diff -u -p -r1.92 in6.c
> --- netinet6/in6.c7 Aug 2011 15:18:40 -   1.92
> +++ netinet6/in6.c8 Aug 2011 08:22:19 -
> @@ -1956,6 +1956,8 @@ in6_ifpprefix(const struct ifnet *ifp, c
>  #if NCARP > 0
>   (ifp->if_type != IFT_CARP || rt->rt_ifp != ifp->if_carpdev)
> &&
>   (rt->rt_ifp->if_type != IFT_CARP || rt->rt_ifp->if_carpdev !=
> ifp)&&
> + (ifp->if_type != IFT_CARP || rt->rt_ifp->if_type != IFT_CARP
> ||
> + rt->rt_ifp->if_carpdev != ifp->if_carpdev) &&
>  #endif
>   1)) {
>   RTFREE(rt);



Re: carp ipv6 ndp issue

2011-08-06 Thread Florian Fuessl
Alexander Bluhm  wrote Sat., Aug. 06, 2011
> On Sat, Aug 06, 2011 at 12:47:27AM +0200, Alexander Bluhm wrote:
> > To trigger the bug, you need two adresses in the same network on
> > the carp and on the parent interface.  One of them has the route,
> > the other cannot do ndp.
> 
> The bridge has the same problem there, bridge and carp can be fixed
> in the same way.

Thank you. This patch works like a charm! :-)

> In my experience ipv6 bridge has always been broken and has more
> issues.  Do we want this larger diff in release mode?

Sounds reasonable to me.

> bluhm

-Florian

> Index: netinet6/in6.c
> ===
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6.c,v
> retrieving revision 1.91
> diff -u -p -r1.91 in6.c
> --- netinet6/in6.c26 Jul 2011 21:19:51 -  1.91
> +++ netinet6/in6.c6 Aug 2011 05:04:18 -
> @@ -61,6 +61,9 @@
>   *   @(#)in.c8.2 (Berkeley) 11/15/93
>   */
> 
> +#include "bridge.h"
> +#include "carp.h"
> +
>  #include 
>  #include 
>  #include 
> @@ -1945,7 +1948,16 @@ in6_ifpprefix(const struct ifnet *ifp, c
>   if (rt == NULL)
>   return (0);
>   if ((rt->rt_flags & (RTF_CLONING | RTF_CLONED)) == 0 ||
> - rt->rt_ifp != ifp) {
> + (rt->rt_ifp != ifp &&
> +#if NBRIDGE > 0
> + (rt->rt_ifp->if_bridge == NULL || ifp->if_bridge == NULL ||
> + rt->rt_ifp->if_bridge != ifp->if_bridge) &&
> +#endif
> +#if NCARP > 0
> + (ifp->if_type != IFT_CARP || rt->rt_ifp != ifp->if_carpdev)
> &&
> + (rt->rt_ifp->if_type != IFT_CARP || rt->rt_ifp->if_carpdev !=
> ifp)&&
> +#endif
> + 1)) {
>   RTFREE(rt);
>   return (0);
>   }



Re: carp ipv6 ndp issue

2011-08-06 Thread Florian Fuessl
Todd T. Fries  wrote Fri, Aug. 05, 2011 6:06 PM
>
> Are you using global IPv6 addresses for your test or link-local
> addresses for your test?

I'm using global IPv6 addresses.

i.e.
host side ping6:
...@melon:~$ ping6 2a00:1230::feed:cafe
PING 2a00:1230::feed:cafe(2a00:1230::feed:cafe) 56 data bytes
>From 2a00:1230::5049:6023 icmp_seq=1 Destination unreachable: Address
unreachable
>From 2a00:1230::5049:6023 icmp_seq=2 Destination unreachable: Address
unreachable
>From 2a00:1230::5049:6023 icmp_seq=3 Destination unreachable: Address
unreachable

carp router master ifconfig:
carp100: flags=8843 mtu 1500
lladdr 00:00:5e:00:01:0a
priority: 0
carp: MASTER carpdev vlan100 vhid 10 advbase 1 advskew 0
groups: carp
status: master
inet6 fe80::200:5eff:fe00:10a%carp100 prefixlen 64 scopeid 0x1d
inet [...]
inet6 2a00:1230::feed:cafe prefixlen 64
vlan100: flags=8943 mtu 1500
lladdr 00:19:bb:e9:ae:b9
priority: 0
vlan: 100 priority: 0 parent interface: em1
groups: vlan
status: active
inet6 fe80::219:bbff:fee9:aeb9%vlan100 prefixlen 64 scopeid 0x9
inet [...]
inet6 2a00:1230::feed:abba prefixlen 64

carp router backup ifconfig:
carp100: flags=8843 mtu 1500
lladdr 00:00:5e:00:01:0a
priority: 0
carp: BACKUP carpdev vlan100 vhid 10 advbase 1 advskew 128
groups: carp
status: backup
inet6 fe80::200:5eff:fe00:10a%carp100 prefixlen 64 scopeid 0x1d
inet [...]
inet6 2a00:1230::feed:cafe prefixlen 64
vlan100: flags=8943 mtu 1500
lladdr 00:04:23:d6:cc:41
priority: 0
vlan: 100 priority: 0 parent interface: em1
groups: vlan
status: active
inet6 fe80::204:23ff:fed6:cc41%vlan100 prefixlen 64 scopeid 0x9
inet [...]
inet6 2a00:1230::feed:baba prefixlen 64

carp master "tcpdump -i vlan100 -n ip6":
tcpdump: listening on vlan100, link-type EN10MB
01:29:12.608013 2a00:1230::5049:6023 > ff02::1:ffed:cafe: icmp6: neighbor
sol: who has 2a00:1230::feed:cafe
01:29:13.230592 fe80::219:bbff:fee9:aeb9 > ff02::12: CARPv2-advertise 36:
vhid=10 advbase=1 advskew=0 demote=0
01:29:13.607932 2a00:1230::5049:6023 > ff02::1:ffed:cafe: icmp6: neighbor
sol: who has 2a00:1230::feed:cafe
01:29:14.241597 fe80::219:bbff:fee9:aeb9 > ff02::12: CARPv2-advertise 36:
vhid=10 advbase=1 advskew=0 demote=0
01:29:14.607946 2a00:1230::5049:6023 > ff02::1:ffed:cafe: icmp6: neighbor
sol: who has 2a00:1230::feed:cafi

sysctl net.inet6.icmp6.nd6_debug=1 and dmesg output on carp master:
nd6_ns_input: NS packet from non-neighbor
nd6_ns_input: src=2a00:1230::5049:6023
nd6_ns_input: dst=ff02:001d::0001:ffed:cafe
nd6_ns_input: tgt=2a00:1230::feed:cafe
nd6_ns_input: NS packet from non-neighbor
nd6_ns_input: src=2001:067c:2088::c1c0:0e0d
nd6_ns_input: dst=ff02:001e::0001:ffed:cafe
nd6_ns_input: tgt=2001:067c:2088::feed:cafe
nd6_ns_input: NS packet from non-neighbor
nd6_ns_input: src=2a00:1230::5049:6060
nd6_ns_input: dst=ff02:001d::0001:ffed:cafe
nd6_ns_input: tgt=2a00:1230::feed:cafe
[...]

> I have found that you sometimes need to ping6 the link-local address
> on a carp interface from a workstation before it will respond to ndp.

Thank's for this hint:
ping6 to link-local address works fine. But afterwards still no response on
carp inet6 address.

> For reference, this scenario happens if you run rtadvd against a carp
> interface for fail-over routers to advertise the carp address for
> routing.

At the moment I've set up static ipv6 address and routing for a few less
important services only. Rtadvd follows as the next step if the basics run
fine.

> Thanks,

feedback on patches of Alexander follows...

> Penned by Florian Fuessl on 20110805  7:00.21, we have:
> | Feature or bug?
> |
> | Latest snapshot /bsd kernel (03. Aug. 11) does not react to neighbor
> | discovery requests for inet6 address on carp master interface, here.



carp ipv6 ndp issue

2011-08-05 Thread Florian Fuessl
Feature or bug?

 

Latest snapshot /bsd kernel (03. Aug. 11) does not react to neighbor
discovery requests for inet6 address on carp master interface, here.

 

-Florian



Re: -current kernel freeze

2011-04-18 Thread Florian Fuessl
Rod Whitworth  wrote Friday, April 08, 2011 1:46 AM
> 
> On Fri, 8 Apr 2011 02:33:51 +0200, Florian Fuessl wrote:
> 
> >upgrading GENERIC kernel from snapshot 24-Mar-2011 to -current results
> in
> >system freezes after some minutes (up to some hours) without any error
> >message, here:[...]
> 8> In case it is useful here is a close relative.
> Mine was based on same snap but cvs updated & compiled a couple of days
> later:
> OpenBSD 4.9-current (GENERIC) #0: Mon Apr  4 13:35:18 EST 2011
> r...@nero.witworx.com:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Celeron(R) D CPU 3.20GHz ("GenuineIntel" 686-class) 3.21
> [...]
> Slightly different hardware but running fine as of today.
> 
> HTH,

snapshot of 16-Apr-2011 is running fine, now :)

OpenBSD 4.9-current (GENERIC) #35: Sat Apr 16 16:30:24 MDT 2011
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.00GHz ("GenuineIntel" 686-class) 3.01 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLU
SH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,CNXT-ID,CX16,xT
PR
real mem  = 1073258496 (1023MB)
avail mem = 1045557248 (997MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xf,
SMBIOS rev. 2.3 @ 0xec000 (77 entries)
bios0: vendor HP version "P51" date 04/26/2006
bios0: HP ProLiant DL380 G4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP SPCR MCFG APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 200MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
ioapic1 at mainbus0: apid 9 pa 0xfec8, version 20, 24 pins
ioapic2 at mainbus0: apid 10 pa 0xfec80400, version 20, 24 pins
ioapic3 at mainbus0: apid 11 pa 0xfec84000, version 20, 24 pins
ioapic4 at mainbus0: apid 12 pa 0xfec84400, version 20, 24 pins
acpiprt0 at acpi0: bus 1 (IP2P)
acpiprt1 at acpi0: bus 3 (PCXA)
acpiprt2 at acpi0: bus 4 (PCXB)
acpiprt3 at acpi0: bus 2 (PTA0)
acpiprt4 at acpi0: bus 6 (PCXC)
acpiprt5 at acpi0: bus 10 (PCXD)
acpiprt6 at acpi0: bus 5 (PTC0)
acpiprt7 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature 31 degC
bios0: ROM list: 0xc/0x8000 0xc8000/0x4000! 0xcc000/0x1600
0xee000/0x2000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
bridge io address conflict 0x1000/0x3000
pchb0 at pci0 dev 0 function 0 "Intel E7520 Host" rev 0x0c
ppb0 at pci0 dev 2 function 0 "Intel E7520 PCIE" rev 0x0c
pci1 at ppb0 bus 2
ppb1 at pci1 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci2 at ppb1 bus 3
bge0 at pci2 dev 1 function 0 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 1 (irq 5), address 00:18:fe:72:82:73
brgphy0 at bge0 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
bge1 at pci2 dev 1 function 1 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 2 (irq 5), address 00:18:fe:72:82:72
brgphy1 at bge1 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
ppb2 at pci1 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci3 at ppb2 bus 4
ciss0 at pci3 dev 3 function 0 "Compaq Smart Array 64xx" rev 0x01: apic 10
int 3 (irq 5)
ciss0: 1 LD, HW rev 1, FW 2.76/2.76, 64bit fifo
scsibus0 at ciss0: 1 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
fixed
sd0: 69459MB, 512 bytes/sec, 142253280 sec total
ppb3 at pci0 dev 6 function 0 "Intel E7520 PCIE" rev 0x0c: apic 8 int 16
(irq 255)
pci4 at ppb3 bus 5
ppb4 at pci4 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci5 at ppb4 bus 6
em0 at pci5 dev 1 function 0 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 11
int 2 (irq 5), address 00:04:23:d6:cc:40
em1 at pci5 dev 1 function 1 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 11
int 1 (irq 5), address 00:04:23:d6:cc:41
ppb5 at pci4 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci6 at ppb5 bus 10
em2 at pci6 dev 1 function 0 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 12
int 1 (irq 5), address 00:04:23:ce:cb:74
em3 at pci6 dev 1 function 1 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 12
int 2 (irq 5), address 00:04:23:ce:cb:75
uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
16 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
19 (irq 5)
uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
18 (irq 5)
uhci3 at pci0 dev 29 function 3 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
16 (irq 5)
ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: apic 8 int
23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "

-current kernel freeze

2011-04-07 Thread Florian Fuessl
Hi,

upgrading GENERIC kernel from snapshot 24-Mar-2011 to -current results in
system freezes after some minutes (up to some hours) without any error
message, here:

OpenBSD 4.9-current (GENERIC) #1: Fri Apr  8 02:20:49 CEST 2011
root@[...]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.00GHz ("GenuineIntel" 686-class) 3.01 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLU
SH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,CNXT-ID,CX16,xT
PR
real mem  = 1073258496 (1023MB)
avail mem = 1045561344 (997MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xf,
SMBIOS rev. 2.3 @ 0xec000 (77 entries)
bios0: vendor HP version "P51" date 04/26/2006
bios0: HP ProLiant DL380 G4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP SPCR MCFG APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 200MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
ioapic1 at mainbus0: apid 9 pa 0xfec8, version 20, 24 pins
ioapic2 at mainbus0: apid 10 pa 0xfec80400, version 20, 24 pins
ioapic3 at mainbus0: apid 11 pa 0xfec84000, version 20, 24 pins
ioapic4 at mainbus0: apid 12 pa 0xfec84400, version 20, 24 pins
acpiprt0 at acpi0: bus 1 (IP2P)
acpiprt1 at acpi0: bus 3 (PCXA)
acpiprt2 at acpi0: bus 4 (PCXB)
acpiprt3 at acpi0: bus 2 (PTA0)
acpiprt4 at acpi0: bus 6 (PCXC)
acpiprt5 at acpi0: bus 10 (PCXD)
acpiprt6 at acpi0: bus 5 (PTC0)
acpiprt7 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature 31 degC
bios0: ROM list: 0xc/0x8000 0xc8000/0x4000! 0xcc000/0x1600
0xee000/0x2000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
bridge io address conflict 0x1000/0x3000
pchb0 at pci0 dev 0 function 0 "Intel E7520 Host" rev 0x0c
ppb0 at pci0 dev 2 function 0 "Intel E7520 PCIE" rev 0x0c
pci1 at ppb0 bus 2
ppb1 at pci1 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci2 at ppb1 bus 3
bge0 at pci2 dev 1 function 0 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 1 (irq 5), address 00:18:fe:72:82:73
brgphy0 at bge0 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
bge1 at pci2 dev 1 function 1 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 2 (irq 5), address 00:18:fe:72:82:72
brgphy1 at bge1 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
ppb2 at pci1 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci3 at ppb2 bus 4
ciss0 at pci3 dev 3 function 0 "Compaq Smart Array 64xx" rev 0x01: apic 10
int 3 (irq 5)
ciss0: 1 LD, HW rev 1, FW 2.76/2.76, 64bit fifo
scsibus0 at ciss0: 1 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
fixed
sd0: 69459MB, 512 bytes/sec, 142253280 sec total
ppb3 at pci0 dev 6 function 0 "Intel E7520 PCIE" rev 0x0c: apic 8 int 16
(irq 255)
pci4 at ppb3 bus 5
ppb4 at pci4 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci5 at ppb4 bus 6
em0 at pci5 dev 1 function 0 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 11
int 2 (irq 5), address 00:04:23:d6:cc:40
em1 at pci5 dev 1 function 1 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 11
int 1 (irq 5), address 00:04:23:d6:cc:41
ppb5 at pci4 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci6 at ppb5 bus 10
em2 at pci6 dev 1 function 0 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 12
int 1 (irq 5), address 00:04:23:ce:cb:74
em3 at pci6 dev 1 function 1 "Intel PRO/1000MT (82546GB)" rev 0x03: apic 12
int 2 (irq 5), address 00:04:23:ce:cb:75
uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
16 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
19 (irq 5)
uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
18 (irq 5)
uhci3 at pci0 dev 29 function 3 "Intel 82801EB/ER USB" rev 0x02: apic 8 int
16 (irq 5)
ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: apic 8 int
23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb6 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xc2
pci7 at ppb6 bus 1
vga1 at pci7 dev 3 function 0 "ATI Rage XL" rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"Compaq iLO" rev 0x01 at pci7 dev 4 function 0 not configured
"Compaq iLO" rev 0x01 at pci7 dev 4 function 2 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "In