diff options
author | Ted Lemon <source@isc.org> | 1996-05-22 09:29:56 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1996-05-22 09:29:56 +0000 |
commit | 3a5811084fd3d664ad4cda132483e1d7ab33001c (patch) | |
tree | d8e0fe897dbb73480132c6b05200208892785de5 /server/bootp.c | |
parent | 5e4ef7037ae874b7a9fef67f48c0fb5e6c1511e0 (diff) | |
download | isc-dhcp-3a5811084fd3d664ad4cda132483e1d7ab33001c.tar.gz |
Move packet location code out of dispatch
Diffstat (limited to 'server/bootp.c')
-rw-r--r-- | server/bootp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/server/bootp.c b/server/bootp.c index e4aaccd8..427499b8 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -51,9 +51,7 @@ void bootp (packet) struct packet *packet; { int result; - struct host_decl *hp = find_hosts_by_haddr (packet -> raw -> htype, - packet -> raw -> chaddr, - packet -> raw -> hlen); + struct host_decl *hp; struct host_decl *host = (struct host_decl *)0; struct packet outgoing; struct dhcp_packet raw; @@ -69,6 +67,13 @@ void bootp (packet) packet -> raw -> hlen, packet -> raw -> chaddr)); + if (!locate_network (packet)) + return; + + hp = find_hosts_by_haddr (packet -> raw -> htype, + packet -> raw -> chaddr, + packet -> raw -> hlen); + lease = find_lease (packet); /* Find an IP address in the host_decl that matches the @@ -224,7 +229,8 @@ void bootp (packet) #ifdef USE_FALLBACK result = send_fallback (&fallback_interface, - packet, &raw, outgoing.packet_length, + (struct packet *)0, + &raw, outgoing.packet_length, raw.siaddr, &to, &hto); if (result < 0) warn ("send_fallback: %m"); |