Re: DHCP client problem?

2000-07-24 Thread David O'Brien

On Mon, Jul 24, 2000 at 01:58:47PM +0900, Seigo Tanimura wrote:
 Did you see this log?
 On Thu, 20 Jul 2000 02:53:11 -0700 (PDT),
   "David E. O'Brien" [EMAIL PROTECTED] said:

I'll take a look at this on Monday.  Thanks! for the bug reports -- just
what I wanted to hear before I thought about a MFC for this.
 
-- 
-- David  ([EMAIL PROTECTED])


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: DHCP client problem?

2000-07-23 Thread Nick Sayer

Reversing that patch fixes it. Since the source for this is in contrib,
I presume we
need to send this back to ISC rather than patch it in our tree?

Tatsumi Hosokawa wrote:
 
 At Fri, 21 Jul 2000 17:22:15 -0700 (PDT),
 Nick Sayer [EMAIL PROTECTED] wrote:
 
  Something changed very recently in the dhcp client stuff that seems
  to have broke my -current machine's ability to be a dhcp client.
 
  The symptom is that I see
 
  ifconfig: netmask 255.255.255.224: bad value
 
  come out of the script invocation, and the ip address does not get
  set.
 
 My -current machine (cvsupped only a few hours ago) has the same
 problem.
 
  If I echo out the parameters and type in THE EXACT SAME command line
  myself, it works just fine. I suspect some sort of bizarre
  quoting conspiracy. :-)
 
 Maybe here?
 (in
 
http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/isc-dhcp/client/scripts/freebsd.diff?r1=1.11r2=1.12)
 
 -  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
 - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
 -ifconfig $interface inet $new_ip_address $new_netmask_arg \
 -   $new_broadcast_arg $medium
 +  if [ "x$old_ip_address" = "x" ] || [ "x$old_ip_address" != "x$new_ip_address" ] 
|| \
 + [ "x$reason" = "xBOUND" ] || [ "x$reason" = "xREBOOT" ]; then
 +ifconfig "$interface" inet "$new_ip_address" "$new_netmask_arg" \
 +   "$new_broadcast_arg" "$medium"
 
 ---
 Tatsumi Hosokawa
 [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: DHCP client problem?

2000-07-23 Thread Seigo Tanimura

On Sun, 23 Jul 2000 13:26:02 -0700,
  Nick Sayer [EMAIL PROTECTED] said:

Nick Reversing that patch fixes it. Since the source for this is in contrib,
Nick I presume we
Nick need to send this back to ISC rather than patch it in our tree?

Nick Tatsumi Hosokawa wrote:
(snip)
 -  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
 - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
 -ifconfig $interface inet $new_ip_address $new_netmask_arg \
 -   $new_broadcast_arg $medium
 +  if [ "x$old_ip_address" = "x" ] || [ "x$old_ip_address" != "x$new_ip_address" ] 
|| \
 + [ "x$reason" = "xBOUND" ] || [ "x$reason" = "xREBOOT" ]; then
 +ifconfig "$interface" inet "$new_ip_address" "$new_netmask_arg" \
 +   "$new_broadcast_arg" "$medium"

Did you see this log?

On Thu, 20 Jul 2000 02:53:11 -0700 (PDT),
  "David E. O'Brien" [EMAIL PROTECTED] said:

David obrien  2000/07/20 02:53:11 PDT

David   Modified files:
David contrib/isc-dhcp/client/scripts freebsd 
David   Log:
David   safe shell quoting
  
David   Obtained from: OpenBSD (rev 1.6)


And I have already suggested the following fix.

On Sun, 23 Jul 2000 18:53:55 +0900,
  Seigo Tanimura [EMAIL PROTECTED] said:

Seigo 1.

Seigo This breaks ifconfig(8) in dhclient-script(8) because our ifconfig(8)
Seigo does not support both a parameter name and its argument to be in a
Seigo single argument.

Seigo What we need to do against dhclient-script(8) to prevent executing
Seigo arbitrary commands include:

Seigo - quoting the arguments from dhclient(8), and
Seigo - intializing the internal variables.

Seigo It should be a good idea to quote each argument from dhclient(8),
Seigo followed by substituting the argument to an internal variable in a way
Seigo like this:

Seigo new_netmask_arg="netmask \"$new_subnet_mask\""

Seigo Then we do not have to quote all of the variables in dhclient-script(8).

Seigo 2.

Seigo An argument of "" is passed to ifconfig(8) if the value of $medium is
Seigo empty, making ifconfig(8) confused. This is because certain ethernet
Seigo card drivers including ed(4) do not support configuring media
Seigo types. Fortunately, the fix proposed in 1 allows us once again to
Seigo remove quotations around the arguments of ifconfig(8).

I wonder if ifconfig(8) of OpenBSD supports providing both the name of
a parameter and its value in a single argument, and an ampty argument...
(eg ifconfig ed1 inet xxx.xxx.xxx.xxx "netmask yyy.yyy.yyy.yyy" "")

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: DHCP client problem?

2000-07-22 Thread Tatsumi Hosokawa

At Fri, 21 Jul 2000 17:22:15 -0700 (PDT),
Nick Sayer [EMAIL PROTECTED] wrote:
 
 Something changed very recently in the dhcp client stuff that seems
 to have broke my -current machine's ability to be a dhcp client.
 
 The symptom is that I see
 
 ifconfig: netmask 255.255.255.224: bad value
 
 come out of the script invocation, and the ip address does not get
 set.

My -current machine (cvsupped only a few hours ago) has the same
problem.

 If I echo out the parameters and type in THE EXACT SAME command line
 myself, it works just fine. I suspect some sort of bizarre
 quoting conspiracy. :-)

Maybe here?
(in
http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/isc-dhcp/client/scripts/freebsd.diff?r1=1.11r2=1.12)

-  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
- [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-ifconfig $interface inet $new_ip_address $new_netmask_arg \
-   $new_broadcast_arg $medium
+  if [ "x$old_ip_address" = "x" ] || [ "x$old_ip_address" != "x$new_ip_address" ] || \
+ [ "x$reason" = "xBOUND" ] || [ "x$reason" = "xREBOOT" ]; then
+ifconfig "$interface" inet "$new_ip_address" "$new_netmask_arg" \
+   "$new_broadcast_arg" "$medium"

---
Tatsumi Hosokawa
[EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



DHCP client problem?

2000-07-21 Thread Nick Sayer

Something changed very recently in the dhcp client stuff that seems
to have broke my -current machine's ability to be a dhcp client.

The symptom is that I see

ifconfig: netmask 255.255.255.224: bad value

come out of the script invocation, and the ip address does not get
set.

If I echo out the parameters and type in THE EXACT SAME command line
myself, it works just fine. I suspect some sort of bizarre
quoting conspiracy. :-)



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message