Bug 771: Radvd does not set ttl value.
authorSebastien Vincent <vincent@clarinet.u-strasbg.fr>
Fri, 18 Dec 2009 17:58:12 +0100
changeset 5860 035a59e5798e
parent 5859 41cff0992d09
child 5861 c8e91a766fc4
Bug 771: Radvd does not set ttl value.
src/applications/radvd/radvd.cc
--- a/src/applications/radvd/radvd.cc	Wed Dec 16 11:17:07 2009 -0500
+++ b/src/applications/radvd/radvd.cc	Fri Dec 18 17:58:12 2009 +0100
@@ -208,6 +208,13 @@
   raHdr.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + raHdr.GetSerializedSize (), 58 /* ICMPv6 */);
   p->AddHeader (raHdr);
 
+  /* Router advertisements MUST always have a ttl of 255
+   * The ttl value should be set as a socket option, but this is not yet implemented
+   */
+  SocketIpTtlTag ttl;
+  ttl.SetTtl(255);
+  p->AddPacketTag(ttl);
+
   /* send RA */
   NS_LOG_LOGIC ("Send RA");
   m_socket->Send (p, 0);