refactoring of Mode Config functionality allows transport and handling of any attribute

This commit is contained in:
Andreas Steffen
2010-05-14 17:07:03 +02:00
parent a273546854
commit 03b5e4d8d7
10 changed files with 739 additions and 742 deletions
+3 -5
View File
@@ -483,16 +483,14 @@ static bool do_command(connection_t *c, struct spd_route *sr,
strncat(nexthop_str, "' ", sizeof(nexthop_str));
}
if (addrbytesptr(&sr->this.host_srcip, NULL)
&& !isanyaddr(&sr->this.host_srcip))
if (!sr->this.host_srcip->is_anyaddr(sr->this.host_srcip))
{
char *n;
strcpy(srcip_str, "PLUTO_MY_SOURCEIP='");
n = srcip_str + strlen(srcip_str);
addrtot(&sr->this.host_srcip, 0
,n , sizeof(srcip_str)-strlen(srcip_str));
snprintf(n, sizeof(srcip_str)-strlen(srcip_str), "%H",
sr->this.host_srcip);
strncat(srcip_str, "' ", sizeof(srcip_str));
}