|
Bugzilla – Full Text Bug Listing |
| Summary: | Routers should advertise themselves from the link-local address | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | shiguowang <shiguowang2007> |
| Component: | ipv6 | Assignee: | Tommaso Pecorella <tommaso.pecorella> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs, tazaki, tommaso.pecorella |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 1697 | ||
| Bug Blocks: | |||
| Attachments: |
Modify route r1's routing table, now the next-hop address is link-local.
patch new patch, cleaned |
||
|
Description
shiguowang
2013-05-21 23:06:15 UTC
Created attachment 1601 [details]
Modify route r1's routing table, now the next-hop address is link-local.
*** Bug 1696 has been marked as a duplicate of this bug. *** Created attachment 1611 [details]
patch
Created attachment 1612 [details]
new patch, cleaned
fixed in changeset 9848:800877664177
I think the following assertion is too much, isn't it ?
src/internet/model/ipv6-static-routing.cc
4.13 void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric)
4.14 {
4.15 NS_LOG_FUNCTION (this << network << networkPrefix << nextHop << interface << prefixToUse << metric);
4.16 + NS_ASSERT_MSG(nextHop.IsLinkLocal(), "Ipv6StaticRouting::AddNetworkRouteTo - Next hop must be link-local");
I guess, the requirement described in the RFC(4861, Section 8) is only about routers, not necessary for hosts.
# since I have a code to configure a host.
routing->SetDefaultRoute (Ipv6Address ("2001:1:2:6::2"), 1, Ipv6Address ("::"), 0);
(In reply to comment #7) > I think the following assertion is too much, isn't it ? > > src/internet/model/ipv6-static-routing.cc > > 4.13 void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, > Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address > prefixToUse, uint32_t metric) > 4.14 { > 4.15 NS_LOG_FUNCTION (this << network << networkPrefix << nextHop << > interface << prefixToUse << metric); > 4.16 + NS_ASSERT_MSG(nextHop.IsLinkLocal(), > "Ipv6StaticRouting::AddNetworkRouteTo - Next hop must be link-local"); > > > I guess, the requirement described in the RFC(4861, Section 8) is only about > routers, not necessary for hosts. > > # since I have a code to configure a host. > routing->SetDefaultRoute (Ipv6Address ("2001:1:2:6::2"), 1, Ipv6Address > ("::"), 0); According to the RFC, a router must advertise itself from the link-local address, and this is consistent, as the hosts should be able to reach it from the link local network. If an host can't reach the default router from the link-local address, it means only one thing: that the router isn't in their LL network and there's another router in between, so that router can't be the default one. Moreover, a router could (and should) discard packets that should be routed and are sent to its global address (it's a risk, they could be from loops or forged by an attacker). I know using link-local addresses can be a pain, but even hosts should use that kind of address. I'm going to revamp the helpers to set up the routers, including radvd. This should help a bit. Cheers, T. |