@@ -2100,43 +2100,33 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie)
2100
2100
// Section 7.2.6: Sending Unsolicited Neighbor Advertisements
2101
2101
#ifdef INET_WITH_xMIPv6
2102
2102
Enter_Method (" sendUnsolicitedNa" );
2103
- #endif /* INET_WITH_xMIPv6 */
2104
2103
2105
- #ifndef INET_WITH_xMIPv6
2106
2104
// In some cases a node may be able to determine that its link-layer
2107
2105
// address has changed (e.g., hot-swap of an interface card) and may
2108
2106
// wish to inform its neighbors of the new link-layer address quickly.
2109
2107
// In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT
2110
2108
// unsolicited Neighbor Advertisement messages to the all-nodes
2111
2109
// multicast address. These advertisements MUST be separated by at
2112
2110
// least RetransTimer seconds.
2113
- #else /* INET_WITH_xMIPv6 */
2114
2111
auto na = makeShared<Ipv6NeighbourAdvertisement>();
2115
2112
Ipv6Address myIPv6Addr = ie->getProtocolData <Ipv6InterfaceData>()->getPreferredAddress ();
2116
- #endif /* INET_WITH_xMIPv6 */
2117
2113
2118
2114
// The Target Address field in the unsolicited advertisement is set to
2119
2115
// an IP address of the interface, and the Target Link-Layer Address
2120
2116
// option is filled with the new link-layer address.
2121
- #ifdef INET_WITH_xMIPv6
2122
2117
na->setTargetAddress (myIPv6Addr);
2123
2118
auto sla = new Ipv6NdTargetLinkLayerAddress ();
2124
2119
sla->setLinkLayerAddress (ie->getMacAddress ());
2125
2120
na->getOptionsForUpdate ().appendOption (sla);
2126
2121
na->addChunkLength (IPv6ND_LINK_LAYER_ADDRESS_OPTION_LENGTH);
2127
- #endif /* INET_WITH_xMIPv6 */
2128
2122
2129
2123
// The Solicited flag MUST be set to zero, in order to avoid confusing
2130
2124
// the Neighbor Unreachability Detection algorithm.
2131
- #ifdef INET_WITH_xMIPv6
2132
2125
na->setSolicitedFlag (false );
2133
- #endif /* INET_WITH_xMIPv6 */
2134
2126
2135
2127
// If the node is a router, it MUST set the Router flag to one;
2136
2128
// otherwise it MUST set it to zero.
2137
- #ifdef INET_WITH_xMIPv6
2138
2129
na->setRouterFlag (rt6->isRouter ());
2139
- #endif /* INET_WITH_xMIPv6 */
2140
2130
2141
2131
// The Override flag MAY be set to either zero or one. In either case,
2142
2132
// neighboring nodes will immediately change the state of their Neighbor
@@ -2145,9 +2135,7 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie)
2145
2135
// one, neighboring nodes will install the new link-layer address in
2146
2136
// their caches. Otherwise, they will ignore the new link-layer
2147
2137
// address, choosing instead to probe the cached address.
2148
- #ifdef INET_WITH_xMIPv6
2149
2138
na->setOverrideFlag (true );
2150
- #endif /* INET_WITH_xMIPv6 */
2151
2139
2152
2140
// A node that has multiple IP addresses assigned to an interface MAY
2153
2141
// multicast a separate Neighbor Advertisement for each address. In
@@ -2174,7 +2162,6 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie)
2174
2162
// Neighbor Unreachability Detection algorithm ensures that all nodes
2175
2163
// obtain a reachable link-layer address, though the delay may be
2176
2164
// slightly longer.
2177
- #ifdef INET_WITH_xMIPv6
2178
2165
auto packet = new Packet (" NApacket" );
2179
2166
Icmpv6::insertCrc (crcMode, na, packet);
2180
2167
packet->insertAtFront (na);
0 commit comments