[Swan-dev] What should PLUTO_MY_CLIENT_NET contain?
Andrew Cagney
andrew.cagney at gmail.com
Tue Aug 6 13:22:10 UTC 2019
I'm looking at this code:
jam(buf, "PLUTO_MY_CLIENT='");
jam_subnet(buf, &sr->this.client);
jam(buf, "' ");
jam(buf, "PLUTO_MY_CLIENT_NET='");
ta = subnet_endpoint(&sr->this.client);
jam_address(buf, &ta);
jam(buf, "' ");
jam(buf, "PLUTO_MY_CLIENT_MASK='");
ta = subnet_mask(&sr->this.client);
jam_address(buf, &ta);
jam(buf, "' ");
If you go by the names you'd think that an ip_subnet contained
network-prefix + mask-bits, but based on how it is used, it can contain
NETWORK_PREFIX+HOST_IDENTIFIER : PORT / MASK-BITS
which means in the above, PLUTO_MY_CLIENT_NET= is set to
NETWORK_PREFIX+HOST_IDENTIFIER.
(in the old code subnet_endpoint() was called networkof() giving the
impression that just the NETWORK_PREFIX was being returned, but it wasn't).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20190806/faaed797/attachment.html>
More information about the Swan-dev
mailing list