implemented inheritance of virtual IP assigned by Mode Config on the responder side

This commit is contained in:
Andreas Steffen
2010-04-11 19:19:20 +02:00
parent 6e939d2f94
commit d3d2b7390f
2 changed files with 17 additions and 1 deletions
+15
View File
@@ -4872,6 +4872,21 @@ static stf_status quick_inI1_outR1_tail(struct verify_oppo_bundle *b,
*/
p = rw_instantiate(p, &c->spd.that.host_addr, md->sender_port
, his_net, c->spd.that.id);
/* inherit any virtual IP assigned by a Mode Config exchange */
if (p->spd.that.modecfg && c->spd.that.modecfg &&
subnetisaddr(his_net, &c->spd.that.host_srcip))
{
char srcip[ADDRTOT_BUF];
DBG(DBG_CONTROL,
addrtot(&c->spd.that.host_srcip, 0, srcip, sizeof(srcip));
DBG_log("inheriting virtual IP source address %s from ModeCfg", srcip)
)
p->spd.that.host_srcip = c->spd.that.host_srcip;
p->spd.that.client = c->spd.that.client;
p->spd.that.has_client = TRUE;
}
}
}
#ifdef DEBUG