|
|
|
|
|
|
| Author |
Message |
Luigi Rizzo *nix forums addict
Joined: 07 Apr 2002
Posts: 72
|
Posted: Sun Jul 14, 2002 4:58 pm Post subject:
reintroduce handling of NULL route in ip_output()
|
|
|
[discussion on -arch, Bcc to -net in case someone is interested there]
Hi,
I would like to reintroduce the ability to pass a NULL
route to p_output(), which has been possible up to rev.1.34 of
ip_output().
Making ip_output() unable to handle NULL routes only saved a single
"if (ro == NULL)" check, but caused the work of allocating/deallocating
the route to be replicated in multiple places in the clients of
ip_output(), and the way this is done is very inconsistent, sometimes
involving the use of static variables which (apart from potential
errors due to misuse) are a no-no if we ever want to go to fine-grained
locking in the network stack. See for example how the route to
ip_output is passed in
netinet/igmp.c
netinet/ip_mroute.c
netinet/ip_input.c
netinet/tcp_subr.c
at least in one place there is a "bug" (like resetting some fields
of an automatic variable right before exiting from the block).
Other usages look suspicious too.
My reason to re-allow NULL routes in ip_output() are:
* simplify the code in the callers by centralizing a common
function;
* make another step towards the removal of global variables in the
protocol stack;
Does any of you have strong and _motivated_ objections ?
thanks
luigi
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 5:11 am | All times are GMT
|
|
Remortgaging | Loans | Loans | Credit Cards | Loans
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|