All of lore.kernel.org
 help / color / mirror / Atom feed
* questions about ipconfig.c, auto-configuration
@ 2003-03-19 20:55 Barker Michael-r43496
  0 siblings, 0 replies; only message in thread
From: Barker Michael-r43496 @ 2003-03-19 20:55 UTC (permalink / raw)
  To: linux-kernel

I am a newbie and this is my first post to this list.

In net/ipv4/ipconfig.c (I'm looking at linuxppc versions in 2.4 and 2.5 trees)
There is a comment describing an if statement.  To me it seems that either the comment is wrong or the if statement is wrong.  Which is it, or how am I misinterpreting?
The phrase "we have multiple network interfaces and no default was set" should correspond to something like (ic_first_dev->next && !ic_default), but there is no ic_default.

	/*
	 * If the config information is insufficient (e.g., our IP address or
	 * IP address of the boot server is missing or we have multiple network
	 * interfaces and no default was set), use BOOTP or RARP to get the
	 * missing values.
	 */
	if (ic_myaddr == INADDR_NONE ||
#ifdef CONFIG_ROOT_NFS
	    (MAJOR(ROOT_DEV) == UNNAMED_MAJOR
	     && root_server_addr == INADDR_NONE
	     && ic_servaddr == INADDR_NONE) ||
#endif
	    ic_first_dev->next) {


How this affects me: I get to this point with three ethernet devices eth0,eth1,eth2 and would like to use the valid parameters in ic_myaddr et al for eth0 and leave the other two to be manually configured after boot time.  But because there are multiple interfaces, ic_first_dev->next is not NULL so ic_dynamic gets called and DHCP is attempted for eth0 instead of using ic_myaddr et al.

So, what am I missing?  Where am I supposed to "set a default" when I have multiple interfaces?

Thanks for your attention

-- 
Michael D. Barker
Sr. Designer, Software, Motorola SPS Canada
This email along with any attachments is classified as General Business Information

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-19 20:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-19 20:55 questions about ipconfig.c, auto-configuration Barker Michael-r43496

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.