[Xorp-hackers] Question on netlink_socket_utilities

Pavlin Radoslavov pavlin at ICSI.Berkeley.EDU
Wed Mar 19 21:47:23 PDT 2008


Ben Greear <greearb at candelatech.com> wrote:

> In the method FibConfigEntryGetNetlinkSocket::parse_buffer_netlink_socket(...)
> there is a big for loop, but most of the case statements seem to break out
> or return, especially the
>          case RTM_NEWROUTE:
> 	case RTM_DELROUTE:
> 	case RTM_GETROUTE:
> 
> Is this on purpose, or should the line below be
> changed to not return out of the method?
> 
> return (NlmUtils::nlm_get_to_fte_cfg(iftree, fte, nlh, rtmsg,
> 						 rta_len));

Yes, this is on purpose. We are parsing the reply entry for the
single-entry query, so apart of the reply entry itself we don't care
about the rest of the entries.

Regards,
Pavlin



More information about the Xorp-hackers mailing list