]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Use local_port and remote_port instead of server_port
authorTed Lemon <source@isc.org>
Wed, 19 Feb 1997 10:50:40 +0000 (10:50 +0000)
committerTed Lemon <source@isc.org>
Wed, 19 Feb 1997 10:50:40 +0000 (10:50 +0000)
bootp.c
server/bootp.c

diff --git a/bootp.c b/bootp.c
index c98c45df9f6d4d3681500c6b6bcb94e43dfc7a1c..2703266d61a2d7a622a7c6b48e41f7d056db6ca7 100644 (file)
--- a/bootp.c
+++ b/bootp.c
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bootp.c,v 1.22 1997/02/18 14:28:54 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: bootp.c,v 1.23 1997/02/19 10:50:40 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -264,7 +264,7 @@ void bootp (packet)
        /* If this was gatewayed, send it back to the gateway... */
        if (raw.giaddr.s_addr) {
                to.sin_addr = raw.giaddr;
-               to.sin_port = server_port;
+               to.sin_port = local_port;
 
 #ifdef USE_FALLBACK
                result = send_fallback (&fallback_interface,
@@ -278,7 +278,7 @@ void bootp (packet)
        /* Otherwise, broadcast it on the local network. */
        } else {
                to.sin_addr.s_addr = INADDR_BROADCAST;
-               to.sin_port = htons (ntohs (server_port) + 1); /* XXX */
+               to.sin_port = remote_port; /* XXX */
        }
 
        errno = 0;
index c98c45df9f6d4d3681500c6b6bcb94e43dfc7a1c..2703266d61a2d7a622a7c6b48e41f7d056db6ca7 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bootp.c,v 1.22 1997/02/18 14:28:54 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: bootp.c,v 1.23 1997/02/19 10:50:40 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -264,7 +264,7 @@ void bootp (packet)
        /* If this was gatewayed, send it back to the gateway... */
        if (raw.giaddr.s_addr) {
                to.sin_addr = raw.giaddr;
-               to.sin_port = server_port;
+               to.sin_port = local_port;
 
 #ifdef USE_FALLBACK
                result = send_fallback (&fallback_interface,
@@ -278,7 +278,7 @@ void bootp (packet)
        /* Otherwise, broadcast it on the local network. */
        } else {
                to.sin_addr.s_addr = INADDR_BROADCAST;
-               to.sin_port = htons (ntohs (server_port) + 1); /* XXX */
+               to.sin_port = remote_port; /* XXX */
        }
 
        errno = 0;