Ben Greear wrote:
> NOTE: This is with my patches applied, so it could
> be my fault. But, it looks like it could be a generic
> problem.
I added some more debugging. It is hitting the assert at the end
of this code. It looks like we should not be doing the CMSG_NXTHDR
if neither of the #ifdefs in this section are defined?
//
// Include the Router Alert option if needed
//
if (ip_router_alert) {
#ifdef HAVE_RFC3542
int currentlen;
void *hbhbuf, *optp = NULL;
cmsgp->cmsg_len = CMSG_LEN(hbhlen);
cmsgp->cmsg_level = IPPROTO_IPV6;
cmsgp->cmsg_type = IPV6_HOPOPTS;
hbhbuf = CMSG_DATA(cmsgp);
currentlen = inet6_opt_init(hbhbuf, hbhlen);
if (currentlen == -1) {
error_msg = c_format("inet6_opt_init(len = %d) failed",
hbhlen);
return (XORP_ERROR);
}
currentlen = inet6_opt_append(hbhbuf, hbhlen, currentlen,
IP6OPT_ROUTER_ALERT, 2, 2, &optp);
if (currentlen == -1) {
error_msg = c_format("inet6_opt_append(len = %d) failed",
currentlen);
return (XORP_ERROR);
}
inet6_opt_set_val(optp, 0, &rtalert_code6, sizeof(rtalert_code6));
if (inet6_opt_finish(hbhbuf, hbhlen, currentlen) == -1) {
error_msg = c_format("inet6_opt_finish(len = %d) failed",
currentlen);
return (XORP_ERROR);
}
#else // ! HAVE_RFC3542 (i.e., the old advanced API)
#ifdef HAVE_IPV6_MULTICAST_ROUTING
//
// TODO: XXX: temporary use HAVE_IPV6_MULTICAST_ROUTING
// to conditionally compile, because Linux doesn't
// have inet6_option_*
//
if (inet6_option_init((void *)cmsgp, &cmsgp, IPV6_HOPOPTS)) {
error_msg = c_format("inet6_option_init(IPV6_HOPOPTS) failed");
return (XORP_ERROR);
}
assert(cmsgp);
if (inet6_option_append(cmsgp, ra_opt6, 4, 0)) {
error_msg = c_format("inet6_option_append(Router Alert)
failed");
return (XORP_ERROR);
}
assert(cmsgp);
#endif // HAVE_IPV6_MULTICAST_ROUTING
#endif // ! HAVE_RFC3542
assert(cmsgp);
cmsgp = CMSG_NXTHDR(&_sndmh, cmsgp);
assert(cmsgp);
}
--
Ben Greear <[EMAIL PROTECTED]>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers