Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a bug leading to incorrect split-include netmasks
This bug was my fault. Introduced in 881eb28 on 15 Oct 2016 ("Correctly handle IPv4 route specified as either 10.1.2.0/255.255.255.0 or 10.1.2.0/24") Left shift of >=32 bits is undefined on x86 (https://stackoverflow.com/a/7471843/20789), and it was causing split-includes of 0.0.0.0/0 to output inconsistent values to the vpnc-script variables for split-includes: CISCO_SPLIT_INC_12_MASKLEN=0 CISCO_SPLIT_INC_12_ADDR=0.0.0.0 CISCO_SPLIT_INC_12_MASK=255.255.255.255 # generated by netmaskbits() in script.c -- WRONG! Caught due to an assertion failing in vpn-slice: dlenski/vpn-slice#9 Signed-off-by: Daniel Lenski <dlenski@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
- Loading branch information