[PATCH] rtconfig: Fix Junos to use local-preference instead of preference
Faidon Liambotis
paravoid at debian.org
Fri Jul 10 14:27:25 UTC 2009
Presumably, this has been a mistake since the original implementation.
Also, use substract pref from preferceCeiling to match what the Cisco
generator does.
---
src/rtconfig/f_junos.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/rtconfig/f_junos.cc b/src/rtconfig/f_junos.cc
index b3ed423..77ccc50 100644
--- a/src/rtconfig/f_junos.cc
+++ b/src/rtconfig/f_junos.cc
@@ -632,7 +632,7 @@ void JunosConfig::printActions(ostream &os, PolicyActionList *actions, ItemAFI *
if (actn->rp_attr == dctn_rp_pref) {
if (actn->rp_method == dctn_rp_pref_set) {
int pref = ((ItemINT *) actn->args->head())->i;
- os << " preference " << pref << ";\n";
+ os << " local-preference " << (preferenceCeiling-pref) << ";\n";
} else
UNIMPLEMENTED_METHOD;
continue;
--
1.5.6.5
More information about the irrtoolset
mailing list