summaryrefslogtreecommitdiff
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-03 18:18:34 +0000
committerhasso <hasso>2004-10-03 18:18:34 +0000
commit18a6dce6f83dd20caf1f36c8e840868ff0bf6dbd (patch)
treeff832cbf6fe2b239bde06268820587bec671ae6d /bgpd/bgp_vty.c
parenta49c0ff6771975eeb1bd7da923a9dc830200cf65 (diff)
Common router id.
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 27a3c2eb..6b3c4988 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -41,6 +41,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "bgpd/bgp_zebra.h"
#include "bgpd/bgp_table.h"
+extern struct in_addr router_id_zebra;
+
/* Utility function to get address family from current node. */
afi_t
bgp_node_afi (struct vty *vty)
@@ -400,6 +402,7 @@ DEFUN (bgp_router_id,
return CMD_WARNING;
}
+ bgp->router_id_static = id;
bgp_router_id_set (bgp, &id);
return CMD_SUCCESS;
@@ -427,14 +430,15 @@ DEFUN (no_bgp_router_id,
return CMD_WARNING;
}
- if (! IPV4_ADDR_SAME (&bgp->router_id, &id))
+ if (! IPV4_ADDR_SAME (&bgp->router_id_static, &id))
{
vty_out (vty, "%% BGP router-id doesn't match%s", VTY_NEWLINE);
return CMD_WARNING;
}
}
- bgp_router_id_unset (bgp);
+ bgp->router_id_static.s_addr = 0;
+ bgp_router_id_set (bgp, &router_id_zebra);
return CMD_SUCCESS;
}