Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of ssh://github.com/gnocuil/DHCPv4-over-v6

  • Loading branch information...
commit 073a570f7b6d526f559d6bc91b2ac70c1adabdec 2 parents a449f08 + a64274b
gnocuil authored October 07, 2012
1  DHCPv4-over-v6
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 86133adccd11745dbc80cd2df0cbdc97528370b9
BIN  dhcp-4.2.3-P2/includes/.dhcpd.h.swp
Binary file not shown
21  dhcp-4.2.3-P2/server/dhcp.c
@@ -2656,6 +2656,27 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
2656 2656
 		}
2657 2657
 	}
2658 2658
 
  2659
+	/*add the DHO_PORT_SET option
  2660
+	 * mim
  2661
+	 */
  2662
+	i = DHO_PORT_SET;
  2663
+	if( !lookup_option(&dhcp_universe, state->options,i)){
  2664
+		oc = (struct option_cache *) 0;
  2665
+		if(option_cache_allocate(&oc, MDL)){
  2666
+			u_int32_t tmp = lease->ip_pset.pset_index << 16 + lease->ip_pset.pset_mask;
  2667
+			if(make_const_data( &oc->expression,
  2668
+						&tmp, 4,
  2669
+						0, 0, MDL)){
  2670
+				option_code_hash_lookup( &oc->option,
  2671
+					dhcp_universe.code_hash,
  2672
+					&i, 0, MDL);
  2673
+				save_option(&dhcp_universe,
  2674
+						state->options,oc);
  2675
+			}
  2676
+			option_cache_dereference(&oc, MDL);
  2677
+		}
  2678
+	}
  2679
+
2659 2680
 	/* Use the subnet mask from the subnet declaration if no other
2660 2681
 	   mask has been provided. */
2661 2682
 	i = DHO_SUBNET_MASK;

0 notes on commit 073a570

Please sign in to comment.
Something went wrong with that request. Please try again.