Bug 1131 - Bug in Ipv4L3Protocol::RemoveAddress()
Bug in Ipv4L3Protocol::RemoveAddress()
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3.10
All All
: P5 minor
Assigned To: George Riley
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-07 10:26 UTC by Andrea Ranieri
Modified: 2011-05-11 00:27 UTC (History)
3 users (show)

See Also:


Attachments
Patch for Ipv4L3Protocol::RemoveAddress() in /src/internet-stack/ipv4-interface.cc (331 bytes, text/plain)
2011-05-07 10:26 UTC, Andrea Ranieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Ranieri 2011-05-07 10:26:42 UTC
Created attachment 1105 [details]
Patch for Ipv4L3Protocol::RemoveAddress() in /src/internet-stack/ipv4-interface.cc

The method Ipv4L3Protocol::RemoveAddress() in /src/internet-stack/ipv4-interface.cc does not remove the requested address correctly. Given that the iterator is never incremented, the function always removes the address no. 0 of the selected interface.

Solution: a simple increment of the iterator seems to solve the problem. A patch is attached below.

Regards
Andrea Ranieri
Comment 1 Tommaso Pecorella 2011-05-10 19:07:15 UTC
You're right.

+1
Comment 2 Tom Henderson 2011-05-11 00:27:21 UTC
fixed in changeset:  ec9edb7731c1

Thanks for posting the patch.