Bug 1702 - A router should't aways add itself as the default router

This commit is contained in:
Tommaso Pecorella
2013-08-07 23:18:48 +02:00
parent 3f302f67cf
commit 54564e2fa6
13 changed files with 287 additions and 36 deletions

View File

@@ -130,10 +130,12 @@ int main (int argc, char** argv)
Ipv6AddressHelper ipv6;
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
Ipv6InterfaceContainer i1 = ipv6.Assign (d1);
i1.SetRouter (1, true);
i1.SetForwarding (1, true);
i1.SetDefaultRouteInAllNodes (1);
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
Ipv6InterfaceContainer i2 = ipv6.Assign (d2);
i2.SetRouter (0, true);
i2.SetForwarding (0, true);
i2.SetDefaultRouteInAllNodes (0);
stackHelper.PrintRoutingTable (n0);