OLD | NEW |
1 /* | 1 /* |
2 * dhcpcd - DHCP client daemon | 2 * dhcpcd - DHCP client daemon |
3 * Copyright (c) 2006-2009 Roy Marples <roy@marples.name> | 3 * Copyright (c) 2006-2009 Roy Marples <roy@marples.name> |
4 * All rights reserved | 4 * All rights reserved |
5 | 5 |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 s += r; | 1133 s += r; |
1134 } else | 1134 } else |
1135 bytes += 4; | 1135 bytes += 4; |
1136 continue; | 1136 continue; |
1137 } | 1137 } |
1138 switch (c) { | 1138 switch (c) { |
1139 case '"': /* FALLTHROUGH */ | 1139 case '"': /* FALLTHROUGH */ |
1140 case '\'': /* FALLTHROUGH */ | 1140 case '\'': /* FALLTHROUGH */ |
1141 case '$': /* FALLTHROUGH */ | 1141 case '$': /* FALLTHROUGH */ |
1142 case '`': /* FALLTHROUGH */ | 1142 case '`': /* FALLTHROUGH */ |
1143 » » case '\\': | 1143 » » case '\\': /* FALLTHROUGH */ |
| 1144 » » case '|': /* FALLTHROUGH */ |
| 1145 » » case '&': |
1144 if (s) { | 1146 if (s) { |
1145 if (len < 3) { | 1147 if (len < 3) { |
1146 errno = ENOBUFS; | 1148 errno = ENOBUFS; |
1147 return -1; | 1149 return -1; |
1148 } | 1150 } |
1149 *s++ = '\\'; | 1151 *s++ = '\\'; |
1150 len--; | 1152 len--; |
1151 } | 1153 } |
1152 bytes++; | 1154 bytes++; |
1153 break; | 1155 break; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 lease->leasetime = ~0U; /* Infinite lease */ | 1393 lease->leasetime = ~0U; /* Infinite lease */ |
1392 } else | 1394 } else |
1393 lease->leasetime = ~0U; /* Default to infinite lease */ | 1395 lease->leasetime = ~0U; /* Default to infinite lease */ |
1394 if (get_option_uint32(&lease->renewaltime, dhcp, DHO_RENEWALTIME) != 0) | 1396 if (get_option_uint32(&lease->renewaltime, dhcp, DHO_RENEWALTIME) != 0) |
1395 lease->renewaltime = 0; | 1397 lease->renewaltime = 0; |
1396 if (get_option_uint32(&lease->rebindtime, dhcp, DHO_REBINDTIME) != 0) | 1398 if (get_option_uint32(&lease->rebindtime, dhcp, DHO_REBINDTIME) != 0) |
1397 lease->rebindtime = 0; | 1399 lease->rebindtime = 0; |
1398 if (get_option_addr(&lease->server, dhcp, DHO_SERVERID) != 0) | 1400 if (get_option_addr(&lease->server, dhcp, DHO_SERVERID) != 0) |
1399 lease->server.s_addr = INADDR_ANY; | 1401 lease->server.s_addr = INADDR_ANY; |
1400 } | 1402 } |
OLD | NEW |