internet-apps: (fixes #1195) RADVD announcing prefixes without autoconfiguration
This commit is contained in:
committed by
Tommaso Pecorella
parent
9991d765d7
commit
bb6183ded8
@@ -18,6 +18,8 @@ This file is a best-effort approach to solving this issue; we will do our best b
|
||||
|
||||
### Changes to existing API
|
||||
|
||||
* (internet-apps) Added a parameter to the RADVD helper to announce a prefix without the autoconfiguration flag.
|
||||
|
||||
### Changes to build system
|
||||
|
||||
### Changed behavior
|
||||
|
||||
@@ -27,7 +27,8 @@ RadvdHelper::RadvdHelper()
|
||||
void
|
||||
RadvdHelper::AddAnnouncedPrefix(uint32_t interface,
|
||||
const Ipv6Address& prefix,
|
||||
uint32_t prefixLength)
|
||||
uint32_t prefixLength,
|
||||
bool slaac)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << int(interface) << prefix << int(prefixLength));
|
||||
if (prefixLength != 64)
|
||||
@@ -59,6 +60,7 @@ RadvdHelper::AddAnnouncedPrefix(uint32_t interface,
|
||||
if (!prefixFound)
|
||||
{
|
||||
Ptr<RadvdPrefix> routerPrefix = Create<RadvdPrefix>(prefix, prefixLength);
|
||||
routerPrefix->SetAutonomousFlag(slaac);
|
||||
m_radvdInterfaces[interface]->AddPrefix(routerPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,12 @@ class RadvdHelper : public ApplicationHelper
|
||||
* @param interface outgoing interface
|
||||
* @param prefix announced IPv6 prefix
|
||||
* @param prefixLength announced IPv6 prefix length
|
||||
* @param slaac available for autoconfiguration
|
||||
*/
|
||||
void AddAnnouncedPrefix(uint32_t interface, const Ipv6Address& prefix, uint32_t prefixLength);
|
||||
void AddAnnouncedPrefix(uint32_t interface,
|
||||
const Ipv6Address& prefix,
|
||||
uint32_t prefixLength,
|
||||
bool slaac = true);
|
||||
|
||||
/**
|
||||
* @brief Enable the router as default router for the interface.
|
||||
|
||||
Reference in New Issue
Block a user