Index: java/net/DatagramSocket.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/DatagramSocket.java,v
retrieving revision 1.25
diff -u -r1.25 DatagramSocket.java
--- java/net/DatagramSocket.java	24 May 2003 04:37:18 -0000	1.25
+++ java/net/DatagramSocket.java	30 May 2003 11:37:30 -0000
@@ -167,28 +167,28 @@
     impl = new PlainDatagramSocketImpl();
     impl.create();
 
-    if (laddr != null)
+    if (laddr == null)
+	laddr = InetAddress.ANY_IF;
+
+    try
       {
-        try
-          {
-            localAddr = laddr;
-            impl.bind(port, laddr);
-          }
-        catch (SocketException exception)
-          {
-            impl.close();
-            throw exception;
-          }
-        catch (RuntimeException exception)
-          {
-            impl.close();
-            throw exception;
-          }
-        catch (Error error)
-          {
-            impl.close();
-            throw error;
-          }
+        localAddr = laddr;
+        impl.bind(port, laddr);
+      }
+    catch (SocketException exception)
+      {
+        impl.close();
+        throw exception;
+      }
+    catch (RuntimeException exception)
+      {
+        impl.close();
+        throw exception;
+      }
+    catch (Error error)
+      {
+        impl.close();
+        throw error;
       }
   }
 
