[strongSwan-dev] python vici load-conn - possible bug
vlakshmi at rocketmail.com
Wed Apr 26 14:42:20 CEST 2017
I am looking at the python vici implementation for strongswan and there seems to be a bug in protocol.py in the Packet class.
def _named_request(cls, request_type, request, message=None):
requestdata = request.encode("UTF-8")
payload = struct.pack("!BB", request_type, len(request)) + request
if message is not None:
return payload + message
So when I create a dictionary for the ipsec config and do a load_conn I got the error as unable to concat bytes and string.And I realized that this is because in the _named_request method above, we are packing request instead of requestdata.Possibly we need to change the length being passed to pack also.
When I replace request with requestdata, the error goes away and it proceeds with the trying to parse/load the connection from configuration.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev