"Filter networks sent from this area\n")
{
struct ospf6_area *area;
- struct prefix_list *plist;
OSPF6_CMD_AREA_GET (argv[0], area);
argc--;
argv++;
- plist = prefix_list_lookup (AFI_IP6, argv[0]);
if (strncmp (argv[1], "in", 2) == 0)
{
if (PREFIX_NAME_IN (area))
{
char buffer[OSPF6_MAX_LSASIZE];
struct ospf6_lsa_header *lsa_header;
- struct ospf6_lsa *old, *lsa;
+ struct ospf6_lsa *lsa;
struct ospf6_external_info *info = route->route_option;
struct ospf6_as_external_lsa *as_external_lsa;
char buf[64];
caddr_t p;
- /* find previous LSA */
- old = ospf6_lsdb_lookup (htons (OSPF6_LSTYPE_AS_EXTERNAL),
- route->path.origin.id, ospf6->router_id,
- ospf6->lsdb);
-
if (IS_OSPF6_DEBUG_ASBR || IS_OSPF6_DEBUG_ORIGINATE (AS_EXTERNAL))
{
prefix2str (&route->prefix, buf, sizeof (buf));
struct ospf6_lsa *new = NULL, *old = NULL, *rem = NULL;
int ismore_recent;
int is_debug = 0;
- int time_delta_ms;
+ unsigned int time_delta_ms;
ismore_recent = 1;
assert (from);
{
struct ospf6_interface *oi;
struct interface *ifp;
- unsigned long int lcost;
ifp = (struct interface *) vty->index;
assert (ifp);
vty_out (vty, "Flag: %x %s", lsa->flag, VNL);
vty_out (vty, "Lock: %d %s", lsa->lock, VNL);
vty_out (vty, "ReTx Count: %d%s", lsa->retrans_count, VNL);
- vty_out (vty, "Threads: Expire: %x, Refresh: %x %s",
- lsa->expire, lsa->refresh, VNL);
+ vty_out (vty, "Threads: Expire: %llx, Refresh: %llx %s",
+ (unsigned long long)lsa->expire, (unsigned long long)lsa->refresh, VNL);
vty_out (vty, "%s", VNL);
return;
}
"InactivityTimer",
};
-static const char *ospf6_neighbor_event_string (int event)
+static inline const char *ospf6_neighbor_event_string (int event)
{
#define OSPF6_NEIGHBOR_UNKNOWN_EVENT_STRING "UnknownEvent"
setsockopt_ipv6_pktinfo (ospf6_sock, 1);
}
-void
+static void
ospf6_set_transport_class (void)
{
#ifdef IPTOS_PREC_INTERNETCONTROL
if (route)
{
- if (nh = (struct ospf6_nexthop *)listhead (route->nh_list))
+ if ((nh = (struct ospf6_nexthop *)listhead (route->nh_list)))
return (nh->ifindex);
}
#define ospf6_route_is_best(r) (CHECK_FLAG ((r)->flag, OSPF6_ROUTE_BEST))
#define ospf6_linkstate_prefix_adv_router(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[0]))
+ ((x)->u.prefix4.s_addr)
#define ospf6_linkstate_prefix_id(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4]))
+ ((x)->u.prefix6.s6_addr32[1])
#define ADV_ROUTER_IN_PREFIX(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[0]))
-#define ID_IN_PREFIX(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4]))
+ ((x)->u.prefix4.s_addr)
/* Function prototype */
extern void ospf6_linkstate_prefix (u_int32_t adv_router, u_int32_t id,
ospf6_merge_nexthops (rt->nh_list, v->nh_list);
}
-static int
+static unsigned int
ospf6_spf_get_ifindex_from_nh (struct ospf6_vertex *v)
{
struct ospf6_nexthop *nh;
return (nh->ifindex);
}
}
- return -1;
+ return 0;
}
static int
caddr_t lsdesc)
{
int i;
- int ifindex;
+ unsigned int ifindex;
struct ospf6_interface *oi;
u_int16_t type;
u_int32_t adv_router;
assert (VERTEX_IS_TYPE (ROUTER, w));
ifindex = (VERTEX_IS_TYPE (NETWORK, v) ? ospf6_spf_get_ifindex_from_nh (v) :
ROUTER_LSDESC_GET_IFID (lsdesc));
- if (ifindex == -1)
+ if (ifindex == 0)
{
zlog_err ("No nexthop ifindex at vertex %s", v->name);
return;
void ospf6_spf_reason_string (unsigned int reason, char *buf, int size)
{
- int bit;
+ unsigned int bit;
int len = 0;
if (!buf)
struct ospf6 *ospf6;
struct timeval start, end, runtime;
struct listnode *node;
- struct ospf6_route *route;
int areas_processed = 0;
char rbuf[32];
XFREE (MTYPE_OSPF6_TOP, o);
}
-static void
-ospf6_enable (struct ospf6 *o)
-{
- struct listnode *node, *nnode;
- struct ospf6_area *oa;
-
- if (CHECK_FLAG (o->flag, OSPF6_DISABLED))
- {
- UNSET_FLAG (o->flag, OSPF6_DISABLED);
- for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa))
- ospf6_area_enable (oa);
- }
-}
-
static void
ospf6_disable (struct ospf6 *o)
{
}
}
-int
+static int
ospf6_maxage_remover (struct thread *thread)
{
struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread);
"OSPF6 area ID in IPv4 address notation\n"
)
{
- struct ospf6 *o;
struct ospf6_interface *oi;
struct ospf6_area *oa;
struct interface *ifp;
u_int32_t area_id;
- o = (struct ospf6 *) vty->index;
-
ifp = if_lookup_by_name (argv[0]);
if (ifp == NULL)
{
{
u_char buf[OSPF_API_MAX_MSG_SIZE];
struct msg_register_event *emsg;
- int len;
+ unsigned int len;
emsg = (struct msg_register_event *) buf;
len = sizeof (struct msg_register_event) +
{
u_char buf[OSPF_API_MAX_MSG_SIZE];
struct msg_sync_lsdb *smsg;
- int len;
+ unsigned int len;
smsg = (struct msg_sync_lsdb *) buf;
len = sizeof (struct msg_sync_lsdb) +
struct in_addr area_id, struct lsa_header *data)
{
struct msg_originate_request *omsg;
- int omsglen;
+ unsigned int omsglen;
char buf[OSPF_API_MAX_MSG_SIZE];
omsg = (struct msg_originate_request *) buf;
{
u_char buf[OSPF_API_MAX_MSG_SIZE];
struct msg_lsa_change_notify *nmsg;
- int len;
+ unsigned int len;
assert (data);
quagga_gettime(QUAGGA_CLK_MONOTONIC, &stop_time);
- zlog_info ("SPF Processing Time(usecs): External Routes: %d\n",
+ zlog_info ("SPF Processing Time(usecs): External Routes: %ld\n",
(stop_time.tv_sec - start_time.tv_sec)*1000000L+
(stop_time.tv_usec - start_time.tv_usec));
}
if (ospf->instance)
sprintf(str, " %d", ospf->instance);
- else
- sprintf(str, "");
/* debug ospf ism (status|events|timers). */
if (IS_CONF_DEBUG_OSPF (ism, ISM) == OSPF_DEBUG_ISM)
for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext))
{
+ rn = NULL;
if (ext->external_info)
rn = route_node_lookup (ext->external_info,
(struct prefix *) &p);
fifo->count = 0;
}
-/* Return the current fifo count */
-static int
-ospf_fifo_count (struct ospf_fifo *fifo)
-{
- return (fifo->count);
-}
-
/* Free ospf packet fifo. */
void
ospf_fifo_free (struct ospf_fifo *fifo)
{
struct ospf *ospf;
int type;
- u_short instance; // PENDING
/* If OSPF instatnce does not exist, return right now. */
ospf = ospf_lookup ();
set metric <+/-metric> check
Ignore the +/- component */
if (! all_digit (arg))
- if ((strncmp (arg, "+", 1) == 0 || strncmp (arg, "-", 1) == 0) &&
- all_digit (arg+1))
- {
- zlog_warn ("OSPF does not support 'set metric +/-'");
- arg++;
- }
- else
- return NULL;
-
+ {
+ if ((strncmp (arg, "+", 1) == 0 || strncmp (arg, "-", 1) == 0) &&
+ all_digit (arg+1))
+ {
+ zlog_warn ("OSPF does not support 'set metric +/-'");
+ arg++;
+ }
+ else
+ {
+ return NULL;
+ }
+ }
metric = XCALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_int32_t));
ret = atoi (arg);
if (l->m[0].type == LSA_LINK_TYPE_POINTOPOINT)
{
struct in_addr nexthop;
+ nexthop.s_addr = 0;
/* If the destination is a router which connects to
the calculating router via a Point-to-MultiPoint
struct stream *s;
struct ospf_path *path;
struct listnode *node;
-#ifdef HAVE_NETLINK
- int ol_cnt = 0, not_ol_cnt = 0;
-#endif /* HAVE_NETLINK */
struct ospf *ospf = ospf_lookup ();
if (redist_check_instance(&zclient->redist[AFI_IP][ZEBRA_ROUTE_OSPF], ospf->instance))
struct ospf_vl_data *vl_data;
struct listnode *node, *nnode;
int i;
- u_short instance;
+ u_short instance = 0;
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type11_lsa_term (ospf);