libnm-util: allow 0.0.0.0/1 route in verify() (rh #1203904)
authorJiří Klimeš <jklimes@redhat.com>
Fri, 20 Mar 2015 13:02:19 +0000 (14:02 +0100)
committerJiří Klimeš <jklimes@redhat.com>
Tue, 24 Mar 2015 11:19:17 +0000 (12:19 +0100)
commitba35c63db60aa652528e492aa483c971b9217f1e
treed24066693ee7268b4077c2fb662a435adbd31290
parent99df201a0cca6a9bddfbcf7434597a2f0123b196
libnm-util: allow 0.0.0.0/1 route in verify() (rh #1203904)

OpenVPN uses a trick to override default route by adding these two routes:
0.0.0.0/1 and 128.0.0.0/1.
We should allow this and only refuse real default route (i.e. prefix == 0).

Also verify IPv6 addresses and routes.

See:
man openvpn (search for def1)
https://community.openvpn.net/openvpn/wiki/IgnoreRedirectGateway

https://bugzilla.redhat.com/show_bug.cgi?id=1203904
libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip6-config.c