Bug 1131

Summary: Bug in Ipv4L3Protocol::RemoveAddress()
Product: ns-3 Reporter: Andrea Ranieri <andreran>
Component: internetAssignee: George Riley <riley>
Status: RESOLVED FIXED    
Severity: minor CC: ns-bugs, tomh, tommaso.pecorella
Priority: P5    
Version: ns-3.10   
Hardware: All   
OS: All   
Attachments: Patch for Ipv4L3Protocol::RemoveAddress() in /src/internet-stack/ipv4-interface.cc

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.