diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/kernel_socket.c | 2 | ||||
-rw-r--r-- | zebra/rib.h | 14 | ||||
-rw-r--r-- | zebra/rt_netlink.c | 2 | ||||
-rw-r--r-- | zebra/rt_socket.c | 4 | ||||
-rw-r--r-- | zebra/rtadv.c | 6 | ||||
-rw-r--r-- | zebra/test_main.c | 2 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 21 | ||||
-rw-r--r-- | zebra/zebra_routemap.c | 2 | ||||
-rw-r--r-- | zebra/zserv.c | 2 |
9 files changed, 29 insertions, 26 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 10cc48c4..5e68c567 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1020,7 +1020,7 @@ rtm_read (struct rt_msghdr *rtm) if (rtm->rtm_type != RTM_GET && rtm->rtm_pid == pid) return; struct prefix_ipv6 p; - unsigned int ifindex = 0; + ifindex_t ifindex = 0; p.family = AF_INET6; p.prefix = dest.sin6.sin6_addr; diff --git a/zebra/rib.h b/zebra/rib.h index 67ffe8de..1dacc7f7 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -228,7 +228,7 @@ struct nexthop /* Interface index. */ char *ifname; - unsigned int ifindex; + ifindex_t ifindex; enum nexthop_types_t type; @@ -425,7 +425,7 @@ extern void multicast_mode_ipv4_set (enum multicast_mode mode); extern enum multicast_mode multicast_mode_ipv4_get (void); extern const char *nexthop_type_to_str (enum nexthop_types_t nh_type); -extern struct nexthop *nexthop_ifindex_add (struct rib *, unsigned int); +extern struct nexthop *nexthop_ifindex_add (struct rib *, ifindex_t); extern struct nexthop *nexthop_ifname_add (struct rib *, char *); extern struct nexthop *nexthop_blackhole_add (struct rib *); extern struct nexthop *nexthop_ipv4_add (struct rib *, struct in_addr *, @@ -433,7 +433,7 @@ extern struct nexthop *nexthop_ipv4_add (struct rib *, struct in_addr *, extern struct nexthop *nexthop_ipv4_ifindex_add (struct rib *, struct in_addr *, struct in_addr *, - unsigned int); + ifindex_t); extern int nexthop_has_fib_child(struct nexthop *); extern void rib_lookup_and_dump (struct prefix_ipv4 *); extern void rib_lookup_and_pushup (struct prefix_ipv4 *); @@ -459,13 +459,13 @@ extern struct route_table *zebra_vrf_static_table (afi_t, safi_t, vrf_id_t); * also implicitly withdraw equal prefix of same type. */ extern int rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p, struct in_addr *gate, struct in_addr *src, - unsigned int ifindex, vrf_id_t vrf_id, int table_id, + ifindex_t ifindex, vrf_id_t vrf_id, int table_id, u_int32_t, u_int32_t, u_char, safi_t); extern int rib_add_ipv4_multipath (struct prefix_ipv4 *, struct rib *, safi_t); extern int rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, - struct in_addr *gate, unsigned int ifindex, + struct in_addr *gate, ifindex_t ifindex, vrf_id_t, safi_t safi); extern struct rib *rib_match_ipv4_safi (struct in_addr addr, safi_t safi, @@ -495,13 +495,13 @@ static_delete_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate, extern int rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p, - struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id, + struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id, int table_id, u_int32_t metric, u_int32_t mtu, u_char distance, safi_t safi); extern int rib_delete_ipv6 (int type, int flags, struct prefix_ipv6 *p, - struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id, safi_t safi); + struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id, safi_t safi); extern struct rib *rib_lookup_ipv6 (struct in6_addr *, vrf_id_t); diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index b164c7ac..2539d614 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -69,7 +69,7 @@ extern u_int32_t nl_rcvbufsize; /* Note: on netlink systems, there should be a 1-to-1 mapping between interface names and ifindex values. */ static void -set_ifindex(struct interface *ifp, unsigned int ifi_index) +set_ifindex(struct interface *ifp, ifindex_t ifi_index) { struct interface *oifp; diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index 4d0a7db5..78ec9e57 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -76,7 +76,7 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family) struct nexthop *nexthop, *tnexthop; int recursing; int nexthop_num = 0; - unsigned int ifindex = 0; + ifindex_t ifindex = 0; int gate = 0; int error; char prefix_buf[PREFIX_STRLEN]; @@ -252,7 +252,7 @@ kernel_rtm_ipv6 (int cmd, struct prefix *p, struct rib *rib, int family) struct nexthop *nexthop, *tnexthop; int recursing; int nexthop_num = 0; - unsigned int ifindex = 0; + ifindex_t ifindex = 0; int gate = 0; int error; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 7bb93055..9450f9a9 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -70,7 +70,7 @@ static int if_leave_all_router (int, struct interface *); static int rtadv_recv_packet (int sock, u_char *buf, int buflen, - struct sockaddr_in6 *from, unsigned int *ifindex, + struct sockaddr_in6 *from, ifindex_t *ifindex, int *hoplimit) { int ret; @@ -408,7 +408,7 @@ rtadv_process_advert (void) } static void -rtadv_process_packet (u_char *buf, unsigned int len, unsigned int ifindex, +rtadv_process_packet (u_char *buf, unsigned int len, ifindex_t ifindex, int hoplimit, vrf_id_t vrf_id) { struct icmp6_hdr *icmph; @@ -472,7 +472,7 @@ rtadv_read (struct thread *thread) int len; u_char buf[RTADV_MSG_SIZE]; struct sockaddr_in6 from; - unsigned int ifindex = 0; + ifindex_t ifindex = 0; int hoplimit = -1; struct zebra_vrf *zvrf = THREAD_ARG (thread); diff --git a/zebra/test_main.c b/zebra/test_main.c index 448d1ef9..09f53adf 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -105,7 +105,7 @@ usage (char *progname, int status) exit (status); } -static unsigned int test_ifindex = 0; +static ifindex_t test_ifindex = 0; /* testrib commands */ DEFUN (test_interface_state, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index d06382c3..1650dabf 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -198,7 +198,7 @@ nexthops_free (struct nexthop *nexthop) } struct nexthop * -nexthop_ifindex_add (struct rib *rib, unsigned int ifindex) +nexthop_ifindex_add (struct rib *rib, ifindex_t ifindex) { struct nexthop *nexthop; @@ -243,7 +243,7 @@ nexthop_ipv4_add (struct rib *rib, struct in_addr *ipv4, struct in_addr *src) struct nexthop * nexthop_ipv4_ifindex_add (struct rib *rib, struct in_addr *ipv4, - struct in_addr *src, unsigned int ifindex) + struct in_addr *src, ifindex_t ifindex) { struct nexthop *nexthop; @@ -291,7 +291,7 @@ nexthop_ipv6_ifname_add (struct rib *rib, struct in6_addr *ipv6, static struct nexthop * nexthop_ipv6_ifindex_add (struct rib *rib, struct in6_addr *ipv6, - unsigned int ifindex) + ifindex_t ifindex) { struct nexthop *nexthop; @@ -1074,8 +1074,9 @@ static int nexthop_active_update (struct route_node *rn, struct rib *rib, int set) { struct nexthop *nexthop; - unsigned int prev_active, prev_index, new_active; - + unsigned int prev_active, new_active; + ifindex_t prev_index; + rib->nexthop_active_num = 0; UNSET_FLAG (rib->status, RIB_ENTRY_CHANGED); @@ -1736,7 +1737,7 @@ rib_delnode (struct route_node *rn, struct rib *rib) int rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p, struct in_addr *gate, struct in_addr *src, - unsigned int ifindex, vrf_id_t vrf_id, int table_id, + ifindex_t ifindex, vrf_id_t vrf_id, int table_id, u_int32_t metric, u_int32_t mtu, u_char distance, safi_t safi) { struct rib *rib; @@ -2076,7 +2077,8 @@ rib_add_ipv4_multipath (struct prefix_ipv4 *p, struct rib *rib, safi_t safi) /* XXX factor with rib_delete_ipv6 */ int rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, - struct in_addr *gate, unsigned int ifindex, vrf_id_t vrf_id, safi_t safi) + struct in_addr *gate, ifindex_t ifindex, + vrf_id_t vrf_id, safi_t safi) { struct route_table *table; struct route_node *rn; @@ -2558,7 +2560,7 @@ static_delete_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate, int rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p, - struct in6_addr *gate, unsigned int ifindex, + struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id, int table_id, u_int32_t metric, u_int32_t mtu, u_char distance, safi_t safi) { @@ -2666,7 +2668,8 @@ rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p, /* XXX factor with rib_delete_ipv6 */ int rib_delete_ipv6 (int type, int flags, struct prefix_ipv6 *p, - struct in6_addr *gate, unsigned int ifindex, vrf_id_t vrf_id, safi_t safi) + struct in6_addr *gate, ifindex_t ifindex, + vrf_id_t vrf_id, safi_t safi) { struct route_table *table; struct route_node *rn; diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index bd9be532..da9cb130 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -134,7 +134,7 @@ route_match_interface (void *rule, struct prefix *prefix, struct nexthop_vrfid *nh_vrf; struct nexthop *nexthop; char *ifname = rule; - unsigned int ifindex; + ifindex_t ifindex; if (type == RMAP_ZEBRA) { diff --git a/zebra/zserv.c b/zebra/zserv.c index 2fd10d9b..e624ef2f 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -827,7 +827,7 @@ zread_ipv4_add (struct zserv *client, u_short length, vrf_id_t vrf_id) u_char nexthop_num; u_char nexthop_type; struct stream *s; - unsigned int ifindex; + ifindex_t ifindex; u_char ifname_len; safi_t safi; |