summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
authorpaul <paul>2003-06-07 01:04:45 +0000
committerpaul <paul>2003-06-07 01:04:45 +0000
commit4aaff3f8d57fbb4fc5f4e5e52175a449686c3169 (patch)
tree543a3b724afbc308994ddfcc4befedb8b1f1d23f /ripd/ripd.c
parent1a691cc34733f1a14cfc2dc1cacd1d3376d771cb (diff)
From: Andrew J. Schorr <aschorr@telemetry-investments.com>
Subject: [zebra 12406] patch for ripd to support "passive-interface default" behavior In Cisco IOS, the router rip passive-interface subcommand can accept an interface name of "default". In that cases, all interfaces are set to be passive by default, and you must explicitly make it non-passive by using the "no passive-interface <ifname>" command if you want updates to go to that interface. <command implemented for zebra>
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index a58406b4..31cfe0cf 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3362,6 +3362,25 @@ DEFUN (show_ip_rip_status,
vty_out (vty, " Routing for Networks:%s", VTY_NEWLINE);
config_write_rip_network (vty, 0);
+ {
+ int found_passive = 0;
+ for (node = listhead (iflist); node; node = nextnode (node))
+ {
+ ifp = getdata (node);
+ ri = ifp->info;
+
+ if ((ri->enable_network || ri->enable_interface) && ri->passive)
+ {
+ if (!found_passive)
+ {
+ vty_out (vty, " Passive Interface(s):%s", VTY_NEWLINE);
+ found_passive = 1;
+ }
+ vty_out (vty, " %s%s", ifp->name, VTY_NEWLINE);
+ }
+ }
+ }
+
vty_out (vty, " Routing Information Sources:%s", VTY_NEWLINE);
vty_out (vty, " Gateway BadPackets BadRoutes Distance Last Update%s", VTY_NEWLINE);
rip_peer_display (vty);
@@ -3630,7 +3649,7 @@ rip_clean ()
}
rip_clean_network ();
- rip_passive_interface_clean ();
+ rip_passive_nondefault_clean ();
rip_offset_clean ();
rip_interface_clean ();
rip_distance_reset ();