summaryrefslogtreecommitdiff
path: root/net/xorp/files/patch-policy__configuration.cc
blob: 178c9adf81e2ae806949b7f99c393b71a3171d61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- policy/configuration.cc.orig	2012-01-11 17:56:10 UTC
+++ policy/configuration.cc
@@ -766,7 +766,9 @@ IEMap::link_code(const string& proto, Co
     POLICY* p = find_policy(proto);
     XLOG_ASSERT(p);
 
-    for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) {
+//    for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) {
+    if (! p->empty())
+    for (POLICY::iterator i = p->end(); --i != p->begin(); ) {
 	PolicyList* pl = i->second;
 
 	pl->link_code(code);