|
Bugzilla – Full Text Bug Listing |
| Summary: | Static routing with support for metrics and longest-prefix-match-first support | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Antti Mäkelä <antti.makela> |
| Component: | routing | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | tomh |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 634 | ||
| Bug Blocks: | |||
| Attachments: |
Patch to improve static routing
Patch to improve static routing Reworked default route handling One-liner fix, actually failed the longest-match test case before Fix for notifyInterfaceDown New version aligned with GetPrefixLength() |
||
|
Description
Antti Mäkelä
2009-08-11 06:22:49 UTC
Created attachment 548 [details]
Patch to improve static routing
Slightly better logging for lookups.
Created attachment 549 [details]
Reworked default route handling
Reworked default route handling to completely do away old structures while maintaining backwards compatibility (old system broke down at IfDown).
Created attachment 550 [details]
One-liner fix, actually failed the longest-match test case before
(In reply to comment #3) > Created an attachment (id=550) [details] > One-liner fix, actually failed the longest-match test case before > +1. If you already wrote a set of test cases for this new code, can we add them as a unit test to this model? (such as populating the routing table with a number of routes, and then querying for a route) (In reply to comment #4) > +1. If you already wrote a set of test cases for this new code, can we add > them as a unit test to this model? (such as populating the routing table with > a number of routes, and then querying for a route) I don't have formal test cases limited only to testing this - I'm testing this right now in the scope of my own work. I guess I could cook up something based on examples/static-routing-slash32.cc though. Created attachment 562 [details]
Fix for notifyInterfaceDown
Actually fixing bug in *original* NotifyInterfaceDown. The problem is that indexing changes when you RemoveRoute(), thus, if a route is getting removed you should NOT increase the index. Reworked for into a while loop instead.
One place where backwards compatibility right now is broken - it used to be that if you have a default route set, doing a GetRoute(0) would always return the default first. Wondering if such a quirk should be included or not. (In reply to comment #7) > One place where backwards compatibility right now is broken - it used to be > that if you have a default route set, doing a GetRoute(0) would always return > the default first. Wondering if such a quirk should be included or not. > I'm not in favor of retaining the quirk. It duplicates GetDefaultRoute () and it seems to prevent a user from obtaining the first route stored in m_hostRoutes. I reviewed this again tonight and plan to push it in the next day or so (along with the patch in bug 614) if there are no other comments. Created attachment 580 [details]
New version aligned with GetPrefixLength()
Uses GetPrefixLength instead of GetMaskLength, as per changes in other bug.
Also, fix for GetDefaultRoute, now it returns empty Ipv4RoutingTableEntry instead of pure zero when there isn't a default route (just like in the old version).
added as changeset 3dc675bb8b20 |