pluto: Completely removed orphaned_holds.
This commit is contained in:
@@ -144,12 +144,6 @@ static void DBG_bare_shunt(const char *op, const struct bare_shunt *bs)
|
|||||||
#define DBG_bare_shunt(op, bs) {}
|
#define DBG_bare_shunt(op, bs) {}
|
||||||
#endif /* !DEBUG */
|
#endif /* !DEBUG */
|
||||||
|
|
||||||
/* The orphaned_holds table records %holds for which we
|
|
||||||
* scan_proc_shunts found no representation of in any connection.
|
|
||||||
* The corresponding ACQUIRE message might have been lost.
|
|
||||||
*/
|
|
||||||
struct eroute_info *orphaned_holds = NULL;
|
|
||||||
|
|
||||||
/* forward declaration */
|
/* forward declaration */
|
||||||
static bool shunt_eroute(connection_t *c, struct spd_route *sr,
|
static bool shunt_eroute(connection_t *c, struct spd_route *sr,
|
||||||
enum routing_t rt_kind, unsigned int op,
|
enum routing_t rt_kind, unsigned int op,
|
||||||
@@ -239,27 +233,6 @@ void record_and_initiate_opportunistic(const ip_subnet *ours,
|
|||||||
networkof(his, &dst);
|
networkof(his, &dst);
|
||||||
initiate_opportunistic(&src, &dst, transport_proto, TRUE, NULL_FD);
|
initiate_opportunistic(&src, &dst, transport_proto, TRUE, NULL_FD);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if present, remove from orphaned_holds list.
|
|
||||||
* NOTE: we do this last in case ours or his is a pointer into a member.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
struct eroute_info **pp, *p;
|
|
||||||
|
|
||||||
for (pp = &orphaned_holds; (p = *pp) != NULL; pp = &p->next)
|
|
||||||
{
|
|
||||||
if (samesubnet(ours, &p->ours)
|
|
||||||
&& samesubnet(his, &p->his)
|
|
||||||
&& transport_proto == p->transport_proto
|
|
||||||
&& portof(&ours->addr) == portof(&p->ours.addr)
|
|
||||||
&& portof(&his->addr) == portof(&p->his.addr))
|
|
||||||
{
|
|
||||||
*pp = p->next;
|
|
||||||
free(p);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* KLIPS */
|
#endif /* KLIPS */
|
||||||
|
|||||||
@@ -121,20 +121,6 @@ struct kernel_ops {
|
|||||||
|
|
||||||
extern const struct kernel_ops *kernel_ops;
|
extern const struct kernel_ops *kernel_ops;
|
||||||
|
|
||||||
/* information from /proc/net/ipsec_eroute */
|
|
||||||
|
|
||||||
struct eroute_info {
|
|
||||||
unsigned long count;
|
|
||||||
ip_subnet ours;
|
|
||||||
ip_subnet his;
|
|
||||||
ip_address dst;
|
|
||||||
ip_said said;
|
|
||||||
int transport_proto;
|
|
||||||
struct eroute_info *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct eroute_info *orphaned_holds;
|
|
||||||
|
|
||||||
extern void show_shunt_status(void);
|
extern void show_shunt_status(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -447,19 +447,6 @@ pfkey_dequeue(void)
|
|||||||
pfkey_iq_head = it->next;
|
pfkey_iq_head = it->next;
|
||||||
free(it);
|
free(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle any orphaned holds, but only if no pfkey input is pending.
|
|
||||||
* For each, we initiate Opportunistic.
|
|
||||||
* note: we don't need to advance the pointer because
|
|
||||||
* record_and_initiate_opportunistic will remove the current
|
|
||||||
* record each time we call it.
|
|
||||||
*/
|
|
||||||
while (orphaned_holds != NULL && !pfkey_input_ready())
|
|
||||||
record_and_initiate_opportunistic(&orphaned_holds->ours
|
|
||||||
, &orphaned_holds->his
|
|
||||||
, orphaned_holds->transport_proto
|
|
||||||
, "%hold found-pfkey");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* asynchronous messages directly from PF_KEY socket */
|
/* asynchronous messages directly from PF_KEY socket */
|
||||||
|
|||||||
Reference in New Issue
Block a user