Closed hedayat closed 1 year ago
I haven't had a chance to test it yet with libreswan 4.9 but will hopefully on the weekend.
I can confirm your code works with Libreswan 4.9, but think the following which also works would be a simpler solution :
if (strstr(output, "Libreswan") != NULL)
Yeah, sure. If so, the condition for others can also be simplified too. However, I thought the code tries to be as specific as possible, so I tried to follow the same spirit. Anyway, I'm OK with whatever you prefer. Currently, I cannot think of any situation which can have false positives, so it should be OK.
Thanks for the bug report.
Fixed now with commit https://github.com/nm-l2tp/NetworkManager-l2tp/commit/3c6ccfe331e65c7af8be4df78cac67c030e96958
Thanks
Starting from libreswan 4.9, it has started to print a simplified version string; e.g. "Libreswan 4.9", so we need to modify how we detect libreswan accordingly. This change adds detecting newer versions in addition to the older ones.
Note: I've not tested the change yet :( I'll try to test it soon.