ri->ri_send = RI_RIP_UNSPEC;
ri->ri_receive = RI_RIP_UNSPEC;
-
+
+ ri->v2_broadcast = 0;
+
if (ri->auth_str)
{
free (ri->auth_str);
"Version 1\n"
"Version 2\n")
+DEFUN (ip_rip_v2_broadcast,
+ ip_rip_v2_broadcast_cmd,
+ "ip rip v2-broadcast",
+ IP_STR
+ "Routing Information Protocol\n"
+ "Send ip broadcast v2 update\n")
+{
+ struct interface *ifp;
+ struct rip_interface *ri;
+
+ ifp = (struct interface *)vty->index;
+ ri = ifp->info;
+
+ ri->v2_broadcast = 1;
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_ip_rip_v2_broadcast,
+ no_ip_rip_v2_broadcast_cmd,
+ "no ip rip v2-broadcast",
+ NO_STR
+ IP_STR
+ "Routing Information Protocol\n"
+ "Send ip broadcast v2 update\n")
+{
+ struct interface *ifp;
+ struct rip_interface *ri;
+
+ ifp = (struct interface *)vty->index;
+ ri = ifp->info;
+
+ ri->v2_broadcast = 0;
+ return CMD_SUCCESS;
+}
+
DEFUN (ip_rip_authentication_mode,
ip_rip_authentication_mode_cmd,
"ip rip authentication mode (md5|text)",
(ri->ri_send == RI_RIP_UNSPEC) &&
(ri->ri_receive == RI_RIP_UNSPEC) &&
(ri->auth_type != RIP_AUTH_MD5) &&
+ (!ri->v2_broadcast) &&
(ri->md5_auth_len != RIP_AUTH_MD5_SIZE) &&
(!ri->auth_str) &&
(!ri->key_chain) )
lookup (ri_version_msg, ri->ri_receive),
VTY_NEWLINE);
+ if (ri->v2_broadcast)
+ vty_out (vty, " ip rip v2-broadcast%s", VTY_NEWLINE);
+
/* RIP authentication. */
if (ri->auth_type == RIP_AUTH_SIMPLE_PASSWORD)
vty_out (vty, " ip rip authentication mode text%s", VTY_NEWLINE);
install_element (INTERFACE_NODE, &no_ip_rip_receive_version_cmd);
install_element (INTERFACE_NODE, &no_ip_rip_receive_version_num_cmd);
+ install_element (INTERFACE_NODE, &ip_rip_v2_broadcast_cmd);
+ install_element (INTERFACE_NODE, &no_ip_rip_v2_broadcast_cmd);
+
install_element (INTERFACE_NODE, &ip_rip_authentication_mode_cmd);
install_element (INTERFACE_NODE, &ip_rip_authentication_mode_authlen_cmd);
install_element (INTERFACE_NODE, &no_ip_rip_authentication_mode_cmd);
static void
rip_update_interface (struct connected *ifc, u_char version, int route_type)
{
+ struct interface *ifp = ifc->ifp;
+ struct rip_interface *ri = ifp->info;
struct sockaddr_in to;
/* When RIP version is 2 and multicast enable interface. */
- if (version == RIPv2 && if_is_multicast (ifc->ifp))
+ if (version == RIPv2 && !ri->v2_broadcast && if_is_multicast (ifp))
{
if (IS_RIP_DEBUG_EVENT)
- zlog_debug ("multicast announce on %s ", ifc->ifp->name);
+ zlog_debug ("multicast announce on %s ", ifp->name);
rip_output_process (ifc, NULL, route_type, version);
return;
}
/* If we can't send multicast packet, send it with unicast. */
- if (if_is_broadcast (ifc->ifp) || if_is_pointopoint (ifc->ifp))
+ if (if_is_broadcast (ifp) || if_is_pointopoint (ifp))
{
if (ifc->address->family == AF_INET)
{
if (IS_RIP_DEBUG_EVENT)
zlog_debug("%s announce to %s on %s",
CONNECTED_PEER(ifc) ? "unicast" : "broadcast",
- inet_ntoa (to.sin_addr), ifc->ifp->name);
+ inet_ntoa (to.sin_addr), ifp->name);
rip_output_process (ifc, &to, route_type, version);
}