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>
diff --git a/ripd/ripd.c b/ripd/ripd.c
index a58406b..31cfe0c 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3362,6 +3362,25 @@
   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_network ();
-  rip_passive_interface_clean ();
+  rip_passive_nondefault_clean ();
   rip_offset_clean ();
   rip_interface_clean ();
   rip_distance_reset ();