On Sat, Dec 31, 2011 at 02:13:48PM +0100, Martin Mares wrote:
Hello!
the limit to 15 characters for interface names is used all over bird (look at 'struct iface' in nest/iface.h), as this is the limit imposed by most Unix APIs, so I didn't see a reason not to use this limit.
Actually, it is not all over bird, but only in nest/iface.h (try grepping for '\[16]').
Using a hard-coded number (not even a named constant) for size of anything global is a mistake -- indeed, my own mistake somewhere in the distant past :) -- and I think we should get rid of it, not follow it in new code.
What is a point if both Linux and BSD also has such limit? (But it is true that we should probably change name[16] to name[IFNAMSIZ] to be safe, IFNAMSIZ constant seems to be a part of standard socket API) -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."