Permalink
Browse files

10-6ack_lease

  • Loading branch information...
YangjunZ committed Oct 6, 2012
1 parent 135c753 commit a64274bef6ad5b12cf5d8139bd798d3336ce2d7f
Showing with 21 additions and 0 deletions.
  1. BIN dhcp-4.2.3-P2/includes/.dhcpd.h.swp
  2. +21 −0 dhcp-4.2.3-P2/server/dhcp.c
Binary file not shown.
@@ -2656,6 +2656,27 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
}
}
+ /*add the DHO_PORT_SET option
+ * mim
+ */
+ i = DHO_PORT_SET;
+ if( !lookup_option(&dhcp_universe, state->options,i)){
+ oc = (struct option_cache *) 0;
+ if(option_cache_allocate(&oc, MDL)){
+ u_int32_t tmp = lease->ip_pset.pset_index << 16 + lease->ip_pset.pset_mask;
+ if(make_const_data( &oc->expression,
+ &tmp, 4,
+ 0, 0, MDL)){
+ option_code_hash_lookup( &oc->option,
+ dhcp_universe.code_hash,
+ &i, 0, MDL);
+ save_option(&dhcp_universe,
+ state->options,oc);
+ }
+ option_cache_dereference(&oc, MDL);
+ }
+ }
+
/* Use the subnet mask from the subnet declaration if no other
mask has been provided. */
i = DHO_SUBNET_MASK;

0 comments on commit a64274b

Please sign in to comment.