Changeset 377 for trunk/packages/sipb-xen-dhcp
- Timestamp:
- Mar 31, 2008, 7:47:09 PM (17 years ago)
- Location:
- trunk/packages/sipb-xen-dhcp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-dhcp/code/dhcpserver.py
r361 r377 23 23 'router': '18.181.0.1', 24 24 'domain_name_server': '18.70.0.160,18.71.0.151,18.72.0.3', 25 'domain_name': 'mit.edu',26 25 'ip_address_lease_time': 60*60*24} 27 26 … … 96 95 elif option_type == "string" : 97 96 options[parameter] = strlist(value).list() 97 98 elif option_type == "RFC3397" : 99 parsed_value = "" 100 for item in value: 101 components = item.split('.') 102 item_fmt = "".join(chr(len(elt)) + elt for elt in components) + "\x00" 103 parsed_value += item_fmt 98 104 105 options[parameter] = strlist(parsed_value).list() 106 99 107 else : 100 108 options[parameter] = strlist(value).list() … … 110 118 if ip is None: #Deactivated? 111 119 return False 120 121 options = {} 112 122 if nic.hostname and '.' in nic.hostname: 113 hostname = nic.hostname123 options['host_name'], options['domain_name'] = nic.hostname.split('.', 1) 114 124 elif nic.machine.name: 115 hostname = nic.machine.name + '.servers.csail.mit.edu' 125 options['host_name'] = nic.machine.name 126 options['domain_name'] = 'servers.csail.mit.edu' 116 127 else: 117 128 hostname = None 129 if DhcpOptions['domain_search'] in packet.GetOption('parameter_request_list'): 130 options['host_name'] += '.' + options['domain_name'] 131 del options['domain_name'] 132 options['domain_search'] = ['mit.edu'] 118 133 if ip is not None: 119 134 ip = ipv4(ip) 120 135 Log.Output(Log.debug,"dhcp_backend : Discover result = "+str(ip)) 121 packet_parameters = self.getParameters( host_name=hostname)136 packet_parameters = self.getParameters(**options) 122 137 123 138 # FIXME: Other offer parameters go here -
trunk/packages/sipb-xen-dhcp/debian/changelog
r364 r377 1 sipb-xen-dhcp (2) unstable; urgency=low 2 3 * DHCP server should send information to set correct information 4 (fixes #44) 5 6 -- SIPB Xen Projet <sipb-xen@mit.edu> Mon, 31 Mar 2008 19:43:00 -0400 7 1 8 sipb-xen-dhcp (1.1) unstable; urgency=low 2 9 -
trunk/packages/sipb-xen-dhcp/debian/control
r361 r377 8 8 Package: sipb-xen-dhcp 9 9 Architecture: all 10 Depends: ${misc:Depends}, daemon, sipb-xen-database-common, sipb-xen-python-pydhcplib 10 Depends: ${misc:Depends}, daemon, sipb-xen-database-common, sipb-xen-python-pydhcplib (>= 0.3.2-2) 11 11 Description: Install and enable the DHCP server
Note: See TracChangeset
for help on using the changeset viewer.