diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-09 20:20:20 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-09 20:20:20 +0300 |
commit | d901be9d685671a751ba1bfd40cffd73961a0d77 (patch) | |
tree | 639301113a1c11d28f97e0c45cd49394872594a5 /accel-pppd/ctrl | |
parent | 14780ff57d994a324de6e7de888381358ec7238f (diff) | |
download | accel-ppp-d901be9d685671a751ba1bfd40cffd73961a0d77.tar.gz accel-ppp-d901be9d685671a751ba1bfd40cffd73961a0d77.zip |
ipoe: fixed local-net with /32 mask
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe_netlink.c | 2 |
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 d69decb..fa7b0a2 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); |