summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-03-10 11:06:18 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-03-10 11:06:18 +0300
commitb5d340e6dfeedaebbc59b0999545ed5950931a29 (patch)
treeb17ca60db1c281a7b5601478655c03768749fa98
parent89c8abc72353d55bea891e0f386a34c63425fa70 (diff)
parentd901be9d685671a751ba1bfd40cffd73961a0d77 (diff)
downloadaccel-ppp-b5d340e6dfeedaebbc59b0999545ed5950931a29.tar.gz
accel-ppp-b5d340e6dfeedaebbc59b0999545ed5950931a29.zip
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe_netlink.c b/accel-pppd/ctrl/ipoe/ipoe_netlink.c
index d69decbe..fa7b0a22 100644
--- a/accel-pppd/ctrl/ipoe/ipoe_netlink.c
+++ b/accel-pppd/ctrl/ipoe/ipoe_netlink.c
@@ -75,7 +75,7 @@ void ipoe_nl_add_net(uint32_t addr, int mask)
ghdr = NLMSG_DATA(&req.n);
ghdr->cmd = IPOE_CMD_ADD_NET;
- mask = ((1 << mask) - 1) << (32 - mask);
+ mask = mask ? ~0 << (32 - mask) : 0;
addattr32(nlh, 1024, IPOE_ATTR_ADDR, addr);
addattr32(nlh, 1024, IPOE_ATTR_MASK, mask);