In RFC 2328, section A.4.2, Router-LSAs, it states that for unnumbered
point-to-point connections, the Link Data field should be the interface's
MIB-II [RFC 1213] ifIndex value.
In ospf_lsa.c, function lsa_link_ptop_set, the code reads:
if ((nbr = ospf_nbr_lookup_ptop (oi)))
if (nbr->state == NSM_Full)
{
/* For unnumbered point-to-point networks, the Link Data field
should specify the interface's MIB-II ifIndex value. */
link_info_set (s, nbr->router_id, oi->address->u.prefix4,
LSA_LINK_TYPE_POINTOPOINT, 0, oi->output_cost);
links++;
}
The parameter oi->address->u.prefix4 (passed to link_info_set) seems to be
at variance with the comment immediately preceding, and also with the RFC.
Is there any reason why the code does not read:
link_info_set (s, nbr->router_id, (struct in_addr) oi->ifp->ifindex,
LSA_LINK_TYPE_POINTOPOINT, 0, oi->output_cost);
?
<M>
point-to-point connections, the Link Data field should be the interface's
MIB-II [RFC 1213] ifIndex value.
In ospf_lsa.c, function lsa_link_ptop_set, the code reads:
if ((nbr = ospf_nbr_lookup_ptop (oi)))
if (nbr->state == NSM_Full)
{
/* For unnumbered point-to-point networks, the Link Data field
should specify the interface's MIB-II ifIndex value. */
link_info_set (s, nbr->router_id, oi->address->u.prefix4,
LSA_LINK_TYPE_POINTOPOINT, 0, oi->output_cost);
links++;
}
The parameter oi->address->u.prefix4 (passed to link_info_set) seems to be
at variance with the comment immediately preceding, and also with the RFC.
Is there any reason why the code does not read:
link_info_set (s, nbr->router_id, (struct in_addr) oi->ifp->ifindex,
LSA_LINK_TYPE_POINTOPOINT, 0, oi->output_cost);
?
<M>