OpenMediaVault-Plugin-Developers / openmediavault-openvpn

OpenMediaVault plugin for OpenVPN
19 stars 19 forks source link

Invalid configuration file when having multiple routes for the same interface #24

Closed EzequielB closed 5 years ago

EzequielB commented 5 years ago

When there are multiple routes for the same interface an invalid openvpn configuration is produced. This seems to be produces in some cases (https://bbs.archlinux.org/viewtopic.php?id=185043)

$ ip r s
default via 10.0.1.1 dev enx001e06367972 
10.0.1.0/24 dev enx001e06367972 proto kernel scope link src 10.0.1.4
10.0.1.0/24 dev enx001e06367972 proto kernel scope link src 10.0.1.4 metric 100 
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 
169.254.0.0/16 dev tun0 scope link metric 1000 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 

This produces an invalid subnet value and invalid configuration file:

;push "route 10.0.1.0
10.0.1.0 255.255.255.0"
theOehrly commented 5 years ago

Will there be a new version released soon, so one can easily update the plugin? That would be good I think. Because there are already guides online on "Howto setup OpenVPN on OMV despite bug" (title paraphrased)

ryecoaaron commented 5 years ago

I just updated the plugin with the merge listed above.