Skip to content

Commit 5b4527e

Browse files
committed
internet: (fixes nsnam#62) ICMP handle time exceed responses.
2 parents 01582e9 + 1483b8b commit 5b4527e

File tree

5 files changed

+697
-4
lines changed

5 files changed

+697
-4
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,4 @@ He Wu (mdzz@u.washington.edu)
248248
Yoshihiko Yazawa (yoshiyaz@gmail.com)
249249
Menglei Zhang (menglei@nyu.edu)
250250
Dizhi Zhou (dizhi.zhou@gmail.com)
251+
Alberto Gallegos Ramonet (ramonet@fc.ritsumei.ac.jp)

src/internet-apps/examples/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ def build(bld):
55
return;
66

77
obj = bld.create_ns3_program('dhcp-example', ['internet', 'internet-apps', 'csma', 'point-to-point', 'applications'])
8-
obj.source = 'dhcp-example.cc'
8+
obj.source = 'dhcp-example.cc'

src/internet/model/ipv4-l3-protocol.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,9 +1029,8 @@ Ipv4L3Protocol::IpForward (Ptr<Ipv4Route> rtentry, Ptr<const Packet> p, const Ip
10291029
ipHeader.SetTtl (ipHeader.GetTtl () - 1);
10301030
if (ipHeader.GetTtl () == 0)
10311031
{
1032-
// Do not reply to ICMP or to multicast/broadcast IP address
1033-
if (ipHeader.GetProtocol () != Icmpv4L4Protocol::PROT_NUMBER &&
1034-
ipHeader.GetDestination ().IsBroadcast () == false &&
1032+
// Do not reply to multicast/broadcast IP address
1033+
if (ipHeader.GetDestination ().IsBroadcast () == false &&
10351034
ipHeader.GetDestination ().IsMulticast () == false)
10361035
{
10371036
Ptr<Icmpv4L4Protocol> icmp = GetIcmp ();

0 commit comments

Comments
 (0)