Commit 904eda19 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

When looking for virtnodes on their physical nodes, look at the jailip

in the nodes table if there is no match in the interfaces table. This
is probably temporary until we get the vserver networking straightened
out. Unlike jails, packets from vservers actually have the IP of the
vserver as the src, not the physical host, but that does not
correspond to anything in the interfaces table. This change lets me
test things as they are now.
parent 00c58994
......@@ -4273,8 +4273,10 @@ iptonodeid(struct in_addr ipaddr, tmcdreq_t *reqp)
"left join node_hostkeys as nk on "
" nk.node_id=nv.node_id "
"where nv.node_id='%s' and "
" (i.IP='%s' and i.role='ctrl') ",
26, reqp->vnodeid, inet_ntoa(ipaddr));
" ((i.IP='%s' and i.role='ctrl') or "
" nv.jailip='%s')",
26, reqp->vnodeid,
inet_ntoa(ipaddr), inet_ntoa(ipaddr));
else {
res = mydb_query("select t.class,t.type,n.node_id,n.jailflag,"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment