* dn_neigh_table vs pneigh_lookup/pneigh_delete
@ 2007-12-19 14:11 Pavel Emelyanov
2007-12-20 11:24 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2007-12-19 14:11 UTC (permalink / raw)
To: Linux Netdev List, Patrick Caulfield, linux-decnet-user
Hi
The pneigh_lookup/delete silently concerns, that the
key_len of the table is more that 4 bytes. Look:
u32 hash_val = *(u32 *)(pkey + key_len - 4);
The hash_val for the proxy neighbor entry is four last bytes
from the pkey.
But the dn_neigh_tables' key_len is sizeof(__le16), that is 2,
so setting (via netlink) the proxy neighbor entry for decnet
will cause this entry to reside in arbitrary hash chain.
Is this too bad for decnet?
Thanks,
Pavel
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: dn_neigh_table vs pneigh_lookup/pneigh_delete
2007-12-19 14:11 dn_neigh_table vs pneigh_lookup/pneigh_delete Pavel Emelyanov
@ 2007-12-20 11:24 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2007-12-20 11:24 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: Linux Netdev List, Patrick Caulfield, linux-decnet-user
Hi,
On Wed, Dec 19, 2007 at 05:11:34PM +0300, Pavel Emelyanov wrote:
> Hi
>
> The pneigh_lookup/delete silently concerns, that the
> key_len of the table is more that 4 bytes. Look:
>
> u32 hash_val = *(u32 *)(pkey + key_len - 4);
>
> The hash_val for the proxy neighbor entry is four last bytes
> from the pkey.
>
> But the dn_neigh_tables' key_len is sizeof(__le16), that is 2,
> so setting (via netlink) the proxy neighbor entry for decnet
> will cause this entry to reside in arbitrary hash chain.
>
> Is this too bad for decnet?
>
> Thanks,
> Pavel
The pneigh code is never used in DECnet, we only use the "normal"
part of the neigh code where the hash function was changed so that
it can be defined for each protocol (and thus doesn't suffer from
this problem)
Steve.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-20 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 14:11 dn_neigh_table vs pneigh_lookup/pneigh_delete Pavel Emelyanov
2007-12-20 11:24 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).