On Thu, 29 May 2014, D. Hugh Redelmeier wrote:
This eliminates the only use of dnh in struct starter_config. It was
never set. So that's good. I will delete it.
ip_address dnh; /* next hop value */
But there is also:
ip_address dr; /* default route */
It looks as if that too is used but never set
The difference here is that this code notices that the value hasn't
been set (address type is 0, a kind of rough-and-ready-test) and then
sets it to any.
So I'll delete dr and eliminate its use. And I think that the more
conventional code for setting w->host_addr to %any is
anyaddr(l->addr_family, &w->host_addr);
Since this is just what case KH_IPHOSTNAME does, I'll move the case
label there.
Thanks.
struct starter_config also has
bool got_default;
Which is never used. Coincidentally, so does struct config_parsed.
I'll ditch them too.
hmm, not sure where that would have been used.
Hunting around, I find some more fields that are never used:
include/ipsecconf/confread.h: struct starter_config:
bool nocrsend;
bool nat_traversal;
bool force_busy;
unsigned int keep_alive;
These were removed config setup options.
char *virtual_private;
bool strictcrlpolicy;
These are still there. We should investigate if these are lost or not.
In struct starter_conn's enum called state, half the STATE_ values are
never used. In the same struct, this isn't used:
bool changed;
In struct starter_end, this is unused:
bool has_id_wildcards;
I've eliminated all these and checked in the result.
Thanks, I'll try and have a look at the changes.
Paul
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev