strongswan: fix local_gateway discovery
authorPhilip Prindeville <redacted>
Mon, 15 Feb 2021 21:51:02 +0000 (14:51 -0700)
committerPhilip Prindeville <redacted>
Tue, 16 Feb 2021 20:32:26 +0000 (13:32 -0700)
commitec72d3a9e47954f0be844fb32abb5ca1e4dda667
treea677c4c3a2d38a7fa94e00d2c715f958c0bb5934
parent495cdbb39d0b5c332c57aab8011541842d163cd2
strongswan: fix local_gateway discovery

This has been observed by myself and @luizluca: ip route get is
appending uid0 to the output, as seen from:

root@OpenWrt2:~# ip route get 1.1.1.1
1.1.1.1 via 174.27.160.1 dev eth3 src 174.27.182.184 uid 0
    cache
root@OpenWrt2:~#

so the fix is an anchored match, discarding all else. Also, using
ip -o means never having to do multiline matches...

Signed-off-by: Philip Prindeville <redacted>
net/strongswan/Makefile
net/strongswan/files/ipsec.init
git clone https://git.99rst.org/PROJECT