Claudio Jeker <[email protected]> writes:
> On Sat, Nov 19, 2016 at 11:38:56AM +0000, Stuart Henderson wrote:
>> On 2016/11/19 10:06, Remi Locherer wrote:
>> > Hi,
>> >
>> > In the output of ospfd -nv I miss metric and type for the redistribute
>> > statement. The below patch adds this.
>>
>> OK with me. This prints the values when they're at defaults as well,
>> but I don't think that is a problem.
>>
>
> Same here. I'm OK with the diff.
Same diff for ospf6d, ok?
Index: printconf.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/ospf6d/printconf.c,v
retrieving revision 1.4
diff -u -p -r1.4 printconf.c
--- printconf.c 22 Aug 2010 21:15:25 -0000 1.4
+++ printconf.c 23 Dec 2016 22:04:31 -0000
@@ -72,24 +72,27 @@ print_redistribute(struct ospfd_conf *co
SIMPLEQ_FOREACH(r, &conf->redist_list, entry) {
switch (r->type & ~REDIST_NO) {
case REDIST_STATIC:
- printf("%sredistribute static\n", print_no(r->type));
+ printf("%sredistribute static ", print_no(r->type));
break;
case REDIST_CONNECTED:
- printf("%sredistribute connected\n", print_no(r->type));
+ printf("%sredistribute connected ", print_no(r->type));
break;
case REDIST_LABEL:
- printf("%sredistribute rtlabel %s\n",
+ printf("%sredistribute rtlabel %s ",
print_no(r->type), rtlabel_id2name(r->label));
break;
case REDIST_ADDR:
- printf("%sredistribute %s/%d\n",
+ printf("%sredistribute %s/%d ",
print_no(r->type), log_in6addr(&r->addr),
r->prefixlen);
break;
case REDIST_DEFAULT:
- printf("%sredistribute default\n", print_no(r->type));
+ printf("%sredistribute default ", print_no(r->type));
break;
}
+ printf("set { metric %d type %d }\n",
+ (r->metric & LSA_METRIC_MASK),
+ ((r->metric & LSA_ASEXT_E_FLAG) == 0 ? 1 : 2));
}
}
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE