]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Small bug in detection of class-A networks.
authorOndrej Filip <feela@network.cz>
Tue, 24 Apr 2012 14:31:17 +0000 (16:31 +0200)
committerOndrej Filip <feela@network.cz>
Tue, 24 Apr 2012 14:31:17 +0000 (16:31 +0200)
lib/ipv4.c

index 8488a2860b2b50f3c3f6afc921962a7107cbe459..751351ca1ac5bcc68e004d46d6155b7edb3a113f 100644 (file)
@@ -60,7 +60,7 @@ ipv4_class_mask(u32 a)
 
        if (a < 0x80000000)
                m = 0xff000000;
-       if (a < 0xc0000000)
+       else if (a < 0xc0000000)
                m = 0xffff0000;
        else
                m = 0xffffff00;