View | Details | Raw Unified | Return to bug 857
Collapse All | Expand All

(-)a/RELEASE_NOTES (-1 / +2 lines)
 Lines 108-114    Link Here 
108
   - bug 850 - Ipv4GlobalRouting::LookupGlobal bug
108
   - bug 850 - Ipv4GlobalRouting::LookupGlobal bug
109
   - bug 864 - Invalid return value in UdpSocketImpl::Send and Ipv4RawSocketImpl::Send
109
   - bug 864 - Invalid return value in UdpSocketImpl::Send and Ipv4RawSocketImpl::Send
110
   - bug 865 - Ipv4RawSocketImpl::RecvFrom does not return from address all the time.
110
   - bug 865 - Ipv4RawSocketImpl::RecvFrom does not return from address all the time.
111
   - Bug 859 - Output interface estimation for the source address bound socket in IPv4 Raw socket
111
   - bug 859 - Output interface estimation for the source address bound socket in IPv4 Raw socket
112
   - bug 857 - Link-Local Multicast handle in Ipv4 Output processing 
112
113
113
Known issues
114
Known issues
114
------------
115
------------
(-)a/src/internet-stack/ipv4-l3-protocol.cc (-2 / +2 lines)
 Lines 539-546    Link Here 
539
  // 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand)
539
  // 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand)
540
  // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call, or ICMP)
540
  // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call, or ICMP)
541
  
541
  
542
  // 1) packet is destined to limited broadcast address
542
  // 1) packet is destined to limited broadcast address or link-local multicast address
543
  if (destination.IsBroadcast ()) 
543
  if (destination.IsBroadcast () || destination.IsLocalMulticast ())
544
    {
544
    {
545
      NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 1:  limited broadcast");
545
      NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 1:  limited broadcast");
546
      ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
546
      ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
(-)a/src/internet-stack/udp-test.cc (+10 lines)
 Lines 256-261    Link Here 
256
  m_receivedPacket = 0;
256
  m_receivedPacket = 0;
257
  m_receivedPacket2 = 0;
257
  m_receivedPacket2 = 0;
258
258
259
  // Simple Link-local multicast test
260
261
  txSocket->BindToNetDevice (txDev1);
262
  SendData (txSocket, "224.0.0.9");
263
  NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 0, "first socket should not receive it (it is bound specifically to the second interface's address");
264
  NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 123, "recv2: 224.0.0.9");
265
266
  m_receivedPacket->RemoveAllByteTags ();
267
  m_receivedPacket2->RemoveAllByteTags ();
268
259
  Simulator::Destroy ();
269
  Simulator::Destroy ();
260
270
261
  return GetErrorStatus ();
271
  return GetErrorStatus ();
(-)a/src/node/ipv4-address.cc (+7 lines)
 Lines 240-245    Link Here 
240
  return (m_address >= 0xe0000000 && m_address <= 0xefffffff);
240
  return (m_address >= 0xe0000000 && m_address <= 0xefffffff);
241
}
241
}
242
242
243
bool 
244
Ipv4Address::IsLocalMulticast (void) const
245
{
246
  // Link-Local multicast address is 224.0.0.0/24
247
  return (m_address & 0xffffff00) == 0xe0000000;
248
}
249
243
void
250
void
244
Ipv4Address::Serialize (uint8_t buf[4]) const
251
Ipv4Address::Serialize (uint8_t buf[4]) const
245
{
252
{
(-)a/src/node/ipv4-address.h (+4 lines)
 Lines 112-117    Link Here 
112
    */
112
    */
113
  bool IsMulticast (void) const;
113
  bool IsMulticast (void) const;
114
  /**
114
  /**
115
    * \return true only if address is in local multicast address scope, 224.0.0.0/24
116
    */
117
  bool IsLocalMulticast (void) const;
118
  /**
115
   * \brief Combine this address with a network mask
119
   * \brief Combine this address with a network mask
116
   *
120
   *
117
   * This method returns an IPv4 address that is this address combined
121
   * This method returns an IPv4 address that is this address combined
(-)a/src/routing/static-routing/ipv4-static-routing.cc (+14 lines)
 Lines 222-227    Link Here 
222
  Ptr<Ipv4Route> rtentry = 0;
222
  Ptr<Ipv4Route> rtentry = 0;
223
  uint16_t longest_mask = 0;
223
  uint16_t longest_mask = 0;
224
  uint32_t shortest_metric = 0xffffffff;
224
  uint32_t shortest_metric = 0xffffffff;
225
  /* when sending on local multicast, there have to be interface specified */
226
  if (dest.IsLocalMulticast ())
227
    {
228
      NS_ASSERT_MSG (oif, "Try to send on link-local multicast address, and no interface index is given!");
229
230
      rtentry = Create<Ipv4Route> ();
231
      rtentry->SetDestination (dest);
232
      rtentry->SetGateway (Ipv4Address::GetZero ());
233
      rtentry->SetOutputDevice (oif);
234
      rtentry->SetSource (m_ipv4->GetAddress (oif->GetIfIndex (), 0).GetLocal ());
235
      return rtentry;
236
    }
237
238
225
  for (NetworkRoutesI i = m_networkRoutes.begin (); 
239
  for (NetworkRoutesI i = m_networkRoutes.begin (); 
226
       i != m_networkRoutes.end (); 
240
       i != m_networkRoutes.end (); 
227
       i++) 
241
       i++) 

Return to bug 857