Michael Stapelberg 53c495091e quirk: enforce minimum lease time of 1 hour for Nintendo devices
The Nintendo Switch has been observed to hold on to IP addresses even after
their expiration. My guess is that this is an oversight: likely the device
enters power saving mode with a configured IP address and just sleeps through
the expiration time.

As the device seems to wake up once every hour, we enforce a minimum lease time
of 1 hour, but only for affected devices. The rest of the network gets short
lease times.

https://twitter.com/zekjur/status/1263949112036282374
2020-05-23 09:07:17 +02:00

74 lines
1.5 KiB
Go

package dhcp4d
// Sorted list of MAC address prefixes assigned to Nintendo.
// From the IEEE MA-L (MAC Address Block Large, formerly known as OUI) database.
var nintendoMacPrefixes = [...][3]byte{
{0x0, 0x9, 0xbf},
{0x0, 0x16, 0x56},
{0x0, 0x17, 0xab},
{0x0, 0x19, 0x1d},
{0x0, 0x19, 0xfd},
{0x0, 0x1a, 0xe9},
{0x0, 0x1b, 0x7a},
{0x0, 0x1b, 0xea},
{0x0, 0x1c, 0xbe},
{0x0, 0x1d, 0xbc},
{0x0, 0x1e, 0x35},
{0x0, 0x1e, 0xa9},
{0x0, 0x1f, 0x32},
{0x0, 0x1f, 0xc5},
{0x0, 0x21, 0x47},
{0x0, 0x21, 0xbd},
{0x0, 0x22, 0x4c},
{0x0, 0x22, 0xaa},
{0x0, 0x22, 0xd7},
{0x0, 0x23, 0x31},
{0x0, 0x23, 0xcc},
{0x0, 0x24, 0x1e},
{0x0, 0x24, 0x44},
{0x0, 0x24, 0xf3},
{0x0, 0x25, 0xa0},
{0x0, 0x26, 0x59},
{0x0, 0x27, 0x9},
{0x4, 0x3, 0xd6},
{0x18, 0x2a, 0x7b},
{0x2c, 0x10, 0xc1},
{0x34, 0x2f, 0xbd},
{0x34, 0xaf, 0x2c},
{0x40, 0xd2, 0x8a},
{0x40, 0xf4, 0x7},
{0x48, 0xa5, 0xe7},
{0x58, 0x2f, 0x40},
{0x58, 0xbd, 0xa3},
{0x5c, 0x52, 0x1e},
{0x60, 0x6b, 0xff},
{0x64, 0xb5, 0xc6},
{0x70, 0x48, 0xf7},
{0x78, 0xa2, 0xa0},
{0x7c, 0xbb, 0x8a},
{0x8c, 0x56, 0xc5},
{0x8c, 0xcd, 0xe8},
{0x94, 0x58, 0xcb},
{0x98, 0x41, 0x5c},
{0x98, 0xb6, 0xe9},
{0x98, 0xe8, 0xfa},
{0x9c, 0xe6, 0x35},
{0xa4, 0x38, 0xcc},
{0xa4, 0x5c, 0x27},
{0xa4, 0xc0, 0xe1},
{0xb8, 0x78, 0x26},
{0xb8, 0x8a, 0xec},
{0xb8, 0xae, 0x6e},
{0xcc, 0x9e, 0x0},
{0xcc, 0xfb, 0x65},
{0xd4, 0xf0, 0x57},
{0xd8, 0x6b, 0xf7},
{0xdc, 0x68, 0xeb},
{0xe0, 0xc, 0x7f},
{0xe0, 0xe7, 0x51},
{0xe0, 0xf6, 0xb5},
{0xe8, 0x4e, 0xce},
{0xe8, 0xda, 0x20},
{0xec, 0xc4, 0xd},
}