Hello,
In Click 2.0, I think there is a bug in userlevel/todevice.cc function
"find_from_device"
The function "find_from_device" is as follows
FromDevice *
ToDevice::find_fromdevice() const
{
Router *r = router();
for (int ei = 0; ei < r->nelements(); ++ei)
if (FromDevice *fd = (FromDevice *) r->element(ei)->cast
("FromDevice"))
return fd;
return 0;
}
would it be the following? because the above code would result fromdevice
and todevice binded although they have different interface names.
FromDevice *
ToDevice::find_fromdevice() const
{
Router *r = router();
for (int ei = 0; ei < r->nelements(); ++ei)
if (FromDevice *fd = (FromDevice *) r->element(ei)->cast
("FromDevice"))
{
if (fd && fd->ifname() == _ifname && fd->fd() >= 0) // check if
the ifname is the same between fromdevice and todevice.
return fd;
}
return 0;
}
best,
Jae-Yong
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click