>Synopsis:      dhclient flushes manual IPv6 default route one lease renewal
>Category:      system
>Environment:
        System      : OpenBSD 5.3
        Details     : OpenBSD 5.3 (GENERIC) #53: Tue Mar 12 18:15:44 MDT 2013
                         
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:

On a network with IPv4-only DHCP and IPv6 with no RA, I ended up with this
/etc/hostname.sis0

  dhcp
  up
  inet6 2001:41D0:1:XXXX::1 56
  !/sbin/route add -inet6 default -gateway 2001:41D0:1:XXff:ff:ff:ff:ff

This default IPv6 route drops every 5 minutes, which is also the frequency at
which dhclient refreshes its leases.

>How-To-Repeat:

  $ sudo /sbin/route add -inet6 default -gateway 2001:41D0:1:XX:ff:ff:ff:ff
  $ route -n show -inet6 | grep default
  default                            2001:41d0:1:XX:ff:ff:ff:ff   UGS 0        0
  $ sudo pkill dhclient && sudo dhclient sis0
  [...]
  $ route -n show -inet6 | grep default
  $

>Fix:

Building dhclient from CURRENT (1.260, [0]) and using it instead seems to be a
valid workaround.

Prior the last change, bind_lease() unconditionally called flush_routes().
However, flush_routes() in [1] is documented to be equivalent to `route -q
$rdomain -n flush -inet -iface $interface` (note the -inet), which might
contradict my understanding of the cause.

[0] http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/dhclient/dhclient.c?rev=1.260
[1] http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/dhclient/kroute.c?rev=1.55




dmesg:
OpenBSD 5.3 (GENERIC) #53: Tue Mar 12 18:15:44 MDT 2013
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2106527744 (2008MB)
avail mem = 2028052480 (1934MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe4e30 (23 entries)
bios0: vendor Intel Corp. version "LY66210M.86A.0137.2008.0104.1540" date 
01/04/2008
bios0: OVH RPS
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices MAC0(S4) PS2K(S4) PS2M(S4) EUSB(S3) USB_(S3) USB2(S3) 
USB3(S3) AC97(S4) MC97(S4) ELAN(S4) ELAK(S4)
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) Celeron(R) CPU 220 @ 1.20GHz, 1200.18 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,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu0: 512KB 64b/line 2-way L2 cache
cpu0: apic clock running at 133MHz
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 14, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 4
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpicpu0 at acpi0
acpibtn0 at acpi0: PWRB
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "SiS 662 PCI" rev 0x01
agp at pchb0 not configured
ppb0 at pci0 dev 1 function 0 "SiS 648FX AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "SiS 6330 VGA" rev 0x04
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 2 function 0 "SiS 964 ISA" rev 0x36
pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0x01: 964: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
ohci0 at pci0 dev 3 function 0 "SiS 5597/5598 USB" rev 0x0f: apic 4 int 20, 
version 1.0, legacy support
ohci1 at pci0 dev 3 function 1 "SiS 5597/5598 USB" rev 0x0f: apic 4 int 21, 
version 1.0, legacy support
ohci2 at pci0 dev 3 function 2 "SiS 5597/5598 USB" rev 0x0f: apic 4 int 22, 
version 1.0, legacy support
ehci0 at pci0 dev 3 function 3 "SiS 7002 USB" rev 0x00: apic 4 int 23
ehci0: timed out waiting for BIOS
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "SiS EHCI root hub" rev 2.00/1.00 addr 1
sis0 at pci0 dev 4 function 0 "SiS 900 10/100BaseTX" rev 0x91: apic 4 int 19, 
address 00:1c:c0:4b:be:54
brgphy0 at sis0 phy 1: BCM54XX 10/100/1000baseT PHY, rev. 1
pciide1 at pci0 dev 5 function 0 "SiS 181 SATA" rev 0x01: DMA
pciide1: using apic 4 int 17 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <TOSHIBA DT01ACA050>
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 6
ppb1 at pci0 dev 31 function 0 "SiS PCI-PCI" rev 0x00
pci2 at ppb1 bus 2
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, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x4e/2: W83627DHG rev 0x25
lm1 at wbsio0 port 0x290/8: W83627DHG
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "SiS OHCI root hub" rev 1.00/1.00 addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 "SiS OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci2: USB revision 1.0
uhub3 at usb3 "SiS OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
root on wd0a (3c6b2ba4c2cabfad.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted

usbdevs:
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), SiS(0x1039), 
rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 powered
 port 7 powered
 port 8 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), SiS(0x1039), 
rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), SiS(0x1039), 
rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), SiS(0x1039), 
rev 1.00
 port 1 powered
 port 2 powered

Reply via email to