Linux MIPS Architecture development
 help / color / mirror / Atom feed
* BOOTP problem
@ 2001-10-04 18:21 Alice Hennessy
  2001-10-04 18:25 ` H . J . Lu
  2001-10-04 18:42 ` Martin Schulze
  0 siblings, 2 replies; 4+ messages in thread
From: Alice Hennessy @ 2001-10-04 18:21 UTC (permalink / raw)
  To: linux-mips; +Cc: ahennessy

Hello,

Just grabbed the latest code and BOOTP doesn't work with the latest
net/ipv4/ipconfig.c
(it does work with the ipconfig.c from a 6/11 snapshot).   Anyone else
having problems?

Alice

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BOOTP problem
  2001-10-04 18:21 BOOTP problem Alice Hennessy
@ 2001-10-04 18:25 ` H . J . Lu
  2001-10-04 18:42 ` Martin Schulze
  1 sibling, 0 replies; 4+ messages in thread
From: H . J . Lu @ 2001-10-04 18:25 UTC (permalink / raw)
  To: Alice Hennessy; +Cc: linux-mips

On Thu, Oct 04, 2001 at 11:21:28AM -0700, Alice Hennessy wrote:
> Hello,
> 
> Just grabbed the latest code and BOOTP doesn't work with the latest
> net/ipv4/ipconfig.c
> (it does work with the ipconfig.c from a 6/11 snapshot).   Anyone else
> having problems?
> 

There was a problem. Try this patch. BTW, I was told it was fixed in
the current kernel.


H.J.
----
--- linux-2.4.5-ac3-ext3/net/ipv4/ipconfig.c.dhcp	Tue May  1 20:59:24 2001
+++ linux-2.4.5-ac3-ext3/net/ipv4/ipconfig.c	Tue May 29 09:30:16 2001
@@ -816,61 +816,63 @@ static int __init ic_bootp_recv(struct s
 		u8 *ext;
 
 #ifdef IPCONFIG_DHCP
+		if (ic_proto_enabled & IC_USE_DHCP) {
 
-		u32 server_id = INADDR_NONE;
-		int mt = 0;
+			u32 server_id = INADDR_NONE;
+			int mt = 0;
 
-		ext = &b->exten[4];
-		while (ext < end && *ext != 0xff) {
-			u8 *opt = ext++;
-			if (*opt == 0)	/* Padding */
-				continue;
-			ext += *ext + 1;
-			if (ext >= end)
-				break;
-			switch (*opt) {
-			case 53:	/* Message type */
-				if (opt[1])
-					mt = opt[2];
-				break;
-			case 54:	/* Server ID (IP address) */
-				if (opt[1] >= 4)
-					memcpy(&server_id, opt + 2, 4);
-				break;
+			ext = &b->exten[4];
+			while (ext < end && *ext != 0xff) {
+				u8 *opt = ext++;
+				if (*opt == 0)	/* Padding */
+					continue;
+				ext += *ext + 1;
+				if (ext >= end)
+					break;
+				switch (*opt) {
+				case 53:	/* Message type */
+					if (opt[1])
+						mt = opt[2];
+					break;
+				case 54:	/* Server ID (IP address) */
+					if (opt[1] >= 4)
+						memcpy(&server_id, opt + 2, 4);
+					break;
+				}
 			}
-		}
 
 #ifdef IPCONFIG_DEBUG
-		printk("DHCP: Got message type %d\n", mt);
+			printk("DHCP: Got message type %d\n", mt);
 #endif
 
-		switch (mt) {
-		    case DHCPOFFER:
-			/* While in the process of accepting one offer,
-			   ignore all others. */
-			if (ic_myaddr != INADDR_NONE)
-				goto drop;
-			/* Let's accept that offer. */
-			ic_myaddr = b->your_ip;
-			ic_servaddr = server_id;
+			switch (mt) {
+			case DHCPOFFER:
+				/* While in the process of accepting one offer,
+				   ignore all others. */
+				if (ic_myaddr != INADDR_NONE)
+					goto drop;
+				/* Let's accept that offer. */
+				ic_myaddr = b->your_ip;
+				ic_servaddr = server_id;
 #ifdef IPCONFIG_DEBUG
-			printk("DHCP: Offered address %u.%u.%u.%u", NIPQUAD(ic_myaddr));
-			printk(" by server %u.%u.%u.%u\n", NIPQUAD(ic_servaddr));
+				printk("DHCP: Offered address %u.%u.%u.%u", NIPQUAD(ic_myaddr));
+				printk(" by server %u.%u.%u.%u\n", NIPQUAD(ic_servaddr));
 #endif
-			break;
+				break;
 
-		    case DHCPACK:
-			/* Yeah! */
-			break;
-
-		    default:
-			/* Urque.  Forget it*/
-			ic_myaddr = INADDR_NONE;
-			ic_servaddr = INADDR_NONE;
-			goto drop;
-		}
+			case DHCPACK:
+				/* Yeah! */
+				break;
+
+			default:
+				/* Urque.  Forget it*/
+				ic_myaddr = INADDR_NONE;
+				ic_servaddr = INADDR_NONE;
+				goto drop;
+			}
 
-		ic_dhcp_msgtype = mt;
+			ic_dhcp_msgtype = mt;
+		}
 
 #endif /* IPCONFIG_DHCP */
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BOOTP problem
  2001-10-04 18:21 BOOTP problem Alice Hennessy
  2001-10-04 18:25 ` H . J . Lu
@ 2001-10-04 18:42 ` Martin Schulze
  2001-10-04 19:04   ` Alice Hennessy
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Schulze @ 2001-10-04 18:42 UTC (permalink / raw)
  To: Alice Hennessy; +Cc: linux-mips

Alice Hennessy wrote:
> Hello,
> 
> Just grabbed the latest code and BOOTP doesn't work with the latest
> net/ipv4/ipconfig.c
> (it does work with the ipconfig.c from a 6/11 snapshot).   Anyone else
> having problems?

Did you add 'ip=auto' to the kernel commandline?  If not, try that.

Regards,

	Joey

-- 
Whenever you meet yourself you're in a time loop or in front of a mirror.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BOOTP problem
  2001-10-04 18:42 ` Martin Schulze
@ 2001-10-04 19:04   ` Alice Hennessy
  0 siblings, 0 replies; 4+ messages in thread
From: Alice Hennessy @ 2001-10-04 19:04 UTC (permalink / raw)
  To: Martin Schulze; +Cc: linux-mips

Martin Schulze wrote:

> Alice Hennessy wrote:
> > Hello,
> >
> > Just grabbed the latest code and BOOTP doesn't work with the latest
> > net/ipv4/ipconfig.c
> > (it does work with the ipconfig.c from a 6/11 snapshot).   Anyone else
> > having problems?
>
> Did you add 'ip=auto' to the kernel commandline?  If not, try that.
>
> Regards,
>
>         Joey
>
> --
> Whenever you meet yourself you're in a time loop or in front of a mirror.

Thanks - that did it.

Alice

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-04 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-04 18:21 BOOTP problem Alice Hennessy
2001-10-04 18:25 ` H . J . Lu
2001-10-04 18:42 ` Martin Schulze
2001-10-04 19:04   ` Alice Hennessy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox