Lines 117-123
Link Here
|
117 |
+ set_jail = argv [i]; |
117 |
+ set_jail = argv [i]; |
118 |
+ if (++i == argc) |
118 |
+ if (++i == argc) |
119 |
+ usage (); |
119 |
+ usage (); |
120 |
+ if (ascii2addr (AF_INET, argv[i], &jail_ip_address) < 0) |
120 |
+ if (inet_pton (AF_INET, argv[i], &jail_ip_address) < 0) |
121 |
+ log_fatal ("invalid ip address: %s", argv[i]); |
121 |
+ log_fatal ("invalid ip address: %s", argv[i]); |
122 |
+ jail_ip_address = ntohl (jail_ip_address); |
122 |
+ jail_ip_address = ntohl (jail_ip_address); |
123 |
+ no_dhcpd_jail = 1; |
123 |
+ no_dhcpd_jail = 1; |
Lines 146-152
Link Here
|
146 |
+ if (!no_dhcpd_jail && (s = getenv ("DHCPD_JAIL_HOSTNAME")) && |
146 |
+ if (!no_dhcpd_jail && (s = getenv ("DHCPD_JAIL_HOSTNAME")) && |
147 |
+ (s2 = getenv ("DHCPD_JAIL_IPADDRESS"))) { |
147 |
+ (s2 = getenv ("DHCPD_JAIL_IPADDRESS"))) { |
148 |
+ set_jail = s; |
148 |
+ set_jail = s; |
149 |
+ if (ascii2addr (AF_INET, s2, &jail_ip_address) < 0) |
149 |
+ if (inet_pton (AF_INET, s2, &jail_ip_address) < 0) |
150 |
+ log_fatal ("invalid ip address: %s", s2); |
150 |
+ log_fatal ("invalid ip address: %s", s2); |
151 |
+ jail_ip_address = ntohl (jail_ip_address); |
151 |
+ jail_ip_address = ntohl (jail_ip_address); |
152 |
+ } |
152 |
+ } |