diff -rcN dhcp-1.4.0p2/client/Makefile.FreeBSD dhcp-1.4.0p3/client/Makefile.FreeBSD
*** dhcp-1.4.0p2/client/Makefile.FreeBSD	Thu Sep 11 10:01:24 1997
--- dhcp-1.4.0p3/client/Makefile.FreeBSD	Thu Sep 10 09:08:15 1998
***************
*** 2,8 ****
  OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
  
  CC = cc
! CFLAGS += -O -I. -I../server -DRETRY_FOREVER #-DDEBUG
  LDFLAGS = -lkvm
  
  SBIN = 		/usr/local/sbin
--- 2,8 ----
  OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
  
  CC = cc
! CFLAGS += -O -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG
  LDFLAGS = -lkvm
  
  SBIN = 		/usr/local/sbin
diff -rcN dhcp-1.4.0p2/client/Makefile.bsdi dhcp-1.4.0p3/client/Makefile.bsdi
*** dhcp-1.4.0p2/client/Makefile.bsdi	Thu Sep 11 09:03:42 1997
--- dhcp-1.4.0p3/client/Makefile.bsdi	Thu Sep 10 09:07:37 1998
***************
*** 3,9 ****
  
  INSTALL = install
  CC = shlicc2
! CFLAGS = -O -I. -I../server -DRETRY_FOREVER #-DVIP -DDEBUG
  LDFLAGS = -lkvm
  
  BIN =		/usr/contrib/bin
--- 3,9 ----
  
  INSTALL = install
  CC = shlicc2
! CFLAGS = -O -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG -DVIP
  LDFLAGS = -lkvm
  
  BIN =		/usr/contrib/bin
diff -rcN dhcp-1.4.0p2/client/dhcpc.c dhcp-1.4.0p3/client/dhcpc.c
*** dhcp-1.4.0p2/client/dhcpc.c	Tue Apr 14 22:43:32 1998
--- dhcp-1.4.0p3/client/dhcpc.c	Thu Sep 10 08:54:19 1998
***************
*** 434,440 ****
  void
  finish()
  {
!   reset_if(&intface, DOWN);
    unlink(pid_filename);
  
    exit(0);
--- 434,440 ----
  void
  finish()
  {
!   reset_if(&intface, UP);
    unlink(pid_filename);
  
    exit(0);
diff -rcN dhcp-1.4.0p2/client/dhcpc_subr.c dhcp-1.4.0p3/client/dhcpc_subr.c
*** dhcp-1.4.0p2/client/dhcpc_subr.c	Fri Nov 14 00:39:55 1997
--- dhcp-1.4.0p3/client/dhcpc_subr.c	Thu Sep 10 09:06:39 1998
***************
*** 2543,2549 ****
--- 2543,2584 ----
  
      bzero(&myaddr, sizeof(myaddr));
      myaddr.sin_family = AF_INET;
+ #ifdef MOBILE_IP
+   {
+      struct ifreq ifrq;
+      int s;
+      struct in_addr ipsrc;
+ 
+      bzero(&ipsrc, sizeof ipsrc);
+      bzero(&ifrq, sizeof ifrq);
+      strncpy(ifrq.ifr_name, intface.name, sizeof(ifrq.ifr_name));
+ 
+      if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+        syslog(LOG_WARNING, "socket() error in make_request()");
+        goto done_mobileip;
+      }
+      if (ioctl(s, SIOCGIFADDR, &ifrq) < 0) {
+        if (errno == EADDRNOTAVAIL) {
+ 	 /* no address */
+        } else {
+ 	 syslog(LOG_WARNING, "ioctl(SIOCGIFADDR) error in make_request()");
+        }
+        goto done_mobileip;
+      }       
+ 
+      ipsrc = ((struct sockaddr_in *)&ifrq.ifr_addr)->sin_addr;
+      
+   done_mobileip:
+      
+      myaddr.sin_addr = ipsrc;
+   }
+ 
+ #else /* MOBILE_IP */
+ 
      myaddr.sin_addr.s_addr = htonl(INADDR_ANY);
+ 
+ #endif /* MOBILE_IP */
+ 
      myaddr.sin_port = dhcpc_port;
      if (bind(sockfd, (struct sockaddr *) &myaddr, sizeof(myaddr)) < 0) {
        close(sockfd);
***************
*** 3206,3208 ****
--- 3241,3252 ----
  	return 0;
  }
  #endif
+ 
+ /*
+  * Local Variables:
+  * c-basic-offset: 2
+  * c-indent-level: 2
+  * c-continued-statement-offset: 2
+  * c-brace-imaginary-offset: 0
+  * End:
+  */
diff -rcN dhcp-1.4.0p2/server/common_subr.h dhcp-1.4.0p3/server/common_subr.h
*** dhcp-1.4.0p2/server/common_subr.h	Fri Jan 30 18:06:10 1998
--- dhcp-1.4.0p3/server/common_subr.h	Tue Sep  8 20:55:51 1998
***************
*** 37,43 ****
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p2"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
--- 37,43 ----
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p3"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
diff -rcN dhcp-1.4.0p2/tools/dhcpm.c dhcp-1.4.0p3/tools/dhcpm.c
*** dhcp-1.4.0p2/tools/dhcpm.c	Mon Jan 26 17:56:27 1998
--- dhcp-1.4.0p3/tools/dhcpm.c	Tue Sep  8 20:54:04 1998
***************
*** 447,458 ****
          else
            tmpip.s_addr = 0;
  	printf("\n\tserver_id: %s", (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
- 	printf("\n");
          if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), ROUTER)) != NULL)
            tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
          else
            tmpip.s_addr = 0;
! 	printf("\tdefault router: %s",
                 (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
  	printf("\n");
  	fflush(stdout);
--- 447,463 ----
          else
            tmpip.s_addr = 0;
  	printf("\n\tserver_id: %s", (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
          if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), ROUTER)) != NULL)
            tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
          else
            tmpip.s_addr = 0;
! 	printf(", default router: %s",
!                (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
!         if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), DNS_SERVER)) != NULL)
!           tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
!         else
!           tmpip.s_addr = 0;
! 	printf(", primary DNS server: %s",
                 (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
  	printf("\n");
  	fflush(stdout);
diff -rcN dhcp-1.4.0p2/tools/dhcpm_sun.c dhcp-1.4.0p3/tools/dhcpm_sun.c
*** dhcp-1.4.0p2/tools/dhcpm_sun.c	Mon Jul  7 17:07:22 1997
--- dhcp-1.4.0p3/tools/dhcpm_sun.c	Tue Sep  8 20:54:13 1998
***************
*** 437,448 ****
  	else
  	  tmpip.s_addr = 0;
  	printf("\n\tserver_id: %s", (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
- 	printf("\n");
          if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), ROUTER)) != NULL)
            tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
          else
            tmpip.s_addr = 0;
! 	printf("\tdefault router: %s",
                 (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
  	printf("\n");
  	fflush(stdout);
--- 437,453 ----
  	else
  	  tmpip.s_addr = 0;
  	printf("\n\tserver_id: %s", (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
          if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), ROUTER)) != NULL)
            tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
          else
            tmpip.s_addr = 0;
! 	printf(", default router: %s",
!                (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
!         if ((option = pickup_opt(rdhcp, DHCPLEN(rudp), DNS_SERVER)) != NULL)
!           tmpip.s_addr = htonl(GETHL(OPTBODY(option)));
!         else
!           tmpip.s_addr = 0;
! 	printf(", primary DNS server: %s",
                 (tmpip.s_addr != 0) ? inet_ntoa(tmpip) : "None");
  	printf("\n");
  	fflush(stdout);
