xbsd.nl

Fix "IPv6 addrconf: prefix with wrong length" messages in Linux

24 Jan 2012

Glancing trough the system-logging of one of my Internet VPS nodes, I noticed that the Kernel Ring Buffer (dmesg) was quite noisy with IPv6 Router Advertisement messages as:
"IPv6 addrconf: prefix with wrong length 48"
Some research learned me that this isn't a harmful error - more a cosmetic one. It's root cause are IPv6 RA's from a device on the network that is advertising something indifferent than your host is configured to. If you maintain a more static configured IPv6 setup, and your IPv6 setup is working as designed for you network, you can safely choose to disable those detections. Here's how to disable IPv6 to accept Router Advertisements and IPv6 Auto-configuration at runtime:
echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
Or per interface:
echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
To make this setting survive a reboot, you can make it permanent with:
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.autoconf = 0
Or again, per interface:
net.ipv6.conf.eth0.accept_ra = 0
net.ipv6.conf.eth0.autoconf = 0
If you're running RHEL or CentOS, like my VPS was, you can add these options to "/etc/sysctl.conf".

blog comments powered by Disqus