Hi,
I am looking at the python vici implementation for strongswan and there seems
to be a bug in protocol.py in the Packet class.
@classmethod
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
else:
return payload
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.
Thanks,vijaya_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev