Hi,
In the output of ospfd -nv I miss metric and type for the redistribute
statement. The below patch adds this.
Sample output:
remi@mistral:..in/ospfd% doas obj/ospfd -nv
WARNING: IP forwarding NOT enabled, running as stub router
router-id 10.10.10.1
fib-update yes
rfc1583compat yes
stub router yes
redistribute rtlabel r1 set { metric 200 type 1 }
^^^^^^^^^^^^^^^^^^^^^^^^^
redistribute rtlabel r2 set { metric 100 type 1 }
^^^^^^^^^^^^^^^^^^^^^^^^^
spf-delay msec 1000
spf-holdtime msec 5000
area 0.0.0.0 {
interface pair0:10.0.0.1 {
metric 500
retransmit-interval 5
router-dead-time 40
hello-interval 10
router-priority 1
transmit-delay 1
auth-type none
}
}
Remi
Index: printconf.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/printconf.c,v
retrieving revision 1.16
diff -u -p -r1.16 printconf.c
--- printconf.c 6 Mar 2013 15:43:23 -0000 1.16
+++ printconf.c 19 Nov 2016 08:46:46 -0000
@@ -76,24 +76,27 @@ print_redistribute(struct redist_list *r
SIMPLEQ_FOREACH(r, rlh, 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), inet_ntoa(r->addr),
mask2prefixlen(r->mask.s_addr));
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));
}
}