--- embedaddon/quagga/ospf6d/ospf6_route.h 2012/10/09 09:22:28 1.1.1.2 +++ embedaddon/quagga/ospf6d/ospf6_route.h 2016/11/02 10:09:11 1.1.1.3 @@ -41,7 +41,7 @@ extern unsigned char conf_debug_ospf6_route; struct ospf6_nexthop { /* Interface index */ - unsigned int ifindex; + ifindex_t ifindex; /* IP address, if any */ struct in6_addr address; @@ -122,6 +122,10 @@ struct ospf6_route /* Destination Type */ u_char type; + /* XXX: It would likely be better to use separate struct in_addr's + * for the advertising router-ID and prefix IDs, instead of stuffing them + * into one. See also XXX below. + */ /* Destination ID */ struct prefix prefix; @@ -236,14 +240,14 @@ extern const char *ospf6_path_type_substr[OSPF6_PATH_T #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.lp.id.s_addr) #define ospf6_linkstate_prefix_id(x) \ - (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4])) + ((x)->u.lp.adv_router.s_addr) #define ADV_ROUTER_IN_PREFIX(x) \ - (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[0])) + ((x)->u.lp.id.s_addr) #define ID_IN_PREFIX(x) \ - (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4])) + ((x)->u.lp.adv_router.s_addr) /* Function prototype */ extern void ospf6_linkstate_prefix (u_int32_t adv_router, u_int32_t id,