radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 107 forks source link

radvdump: show routes with prefixlen > 64 #42

Closed pavlix closed 9 years ago

pavlix commented 9 years ago

Current radvdump code blindly copies over eight bytes of route prefix but its size in bytes can actually be zero, eight or sixteen.

Use the following /etc/radvd.conf to reproduce:

interface eth0 {
    AdvSendAdvert on;
    MinRtrAdvInterval 3;
    MaxRtrAdvInterval 4;
    route 2001:db8:0:0:11::/80 {};
};

Output before the change:

route 2001:db8::/80
{
    AdvRoutePreference medium;
    AdvRouteLifetime 12;
}; # End of route definition

Output after the change:

route 2001:db8:0:0:11::/80
{
    AdvRoutePreference medium;
    AdvRouteLifetime 12;
}; # End of route definition

See also: