In message <xfmail.990430112019....@polstra.com>, John Polstra writes: >Rodney W. Grimes wrote: >>> Pierre Beyssac wrote: >>> >>> > Wouldn't it be sensible to issue a warning (or panic) when >>> > increasing the reference count reaches 0, rather than causing a >>> > later kernel segfault? It would involve some overhead though, and >>> > I'm not sure having 2^32 routes is currently realistic since most >>> > machines don't even have that many bytes of RAM, but it might be >>> > true one day... >>> >>> It would be pretty hard to create 2^32 routes, given that IPv4 only >>> has 32-bit addresses. :-) Also, if you time it I suspect you'll find >>> that it would take a geological lifetime on a fast machine to add that >>> many routes. >> >> But some of us are playing with IPv6 and it is easy to create >2^32 >> routes in that environment. > >You're being totally unrealistic. You can't create >2^32 of >_anything_ on an i386 without running out of memory.
Well, John, you can, the newer ones will address 2^36 bytes of memory and even a i386 can address 2^32 bytes or 2^35 bits... But hair splitting aside, you certainly cannot create 2^32 routes without having other significant problems, and while I agree with Rod that the overflow should be checked, I think it should be done with a KASSERT() if not just with a comment. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message