]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Add missing prefix bit length for addrlabel
authorVarun Chandramohan <varunc@linux.vnet.ibm.com>
Thu, 14 Feb 2008 09:51:08 +0000 (15:21 +0530)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Thu, 14 Feb 2008 16:30:25 +0000 (08:30 -0800)
The prefix bit lenght value was not updated, resulting in incorrect addrlabel
entry. This patch fixes that issue.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
ip/ipaddrlabel.c

index 1c873e91d98216148a26028069ce2440c6f32fa2..a4cdeceb0d70556848466f34ac5f644ee863ae1a 100644 (file)
@@ -173,6 +173,7 @@ static int ipaddrlabel_modify(int cmd, int argc, char **argv)
 
        addattr32(&req.n, sizeof(req), IFAL_LABEL, label);
        addattr_l(&req.n, sizeof(req), IFAL_ADDRESS, &prefix.data, prefix.bytelen);
+       req.ifal.ifal_prefixlen = prefix.bitlen;
 
        if (req.ifal.ifal_family == AF_UNSPEC)
                req.ifal.ifal_family = AF_INET6;