Commit d48c1afe authored by Leigh B Stoller's avatar Leigh B Stoller

Fix for gre routing problem: The basic problem is that this:

host1> ip route add default dev veth2.tun2

is sorta meaningless when the dev is one side of a veth pair, and this
side has no IP address (the other side inside the container has the IP
address).  But this:

host1> ip route add default via dev veth2.tun2

has no meaning either since the root context knows nothing about (cause its inside the container).

But if I add the magic "onlink" option the the command above, it
works. ÊIt says "pretend that the nexthop is directly attached to this
link, even if it does not match any interface prefix." I am not
entirely sure what actually happens to the packet to make it work. I
checked with tcpdump, and the ethernet src/dst address are the same
when heading down the veth, but look fine after that.
parent 1907722b
......@@ -114,7 +114,7 @@ if [ "x$ELABROUTES" != "x" ]; then
if [ $_if = $DEV ]; then
echo "Emulab configuring route for CT$VEID: exp net ($_if)"
$IP route replace $_rt dev $_if table $ROUTETABLE
$IP route replace default via $_rt dev $_if onlink table $ROUTETABLE
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment