-/* $OpenBSD: clparse.c,v 1.84 2014/05/05 14:44:18 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.85 2014/05/05 18:02:49 krw Exp $ */
/* Parser for dhclient config and lease files. */
int code, count, token;
token = next_token(NULL, cfile);
-
+
switch (token) {
case TOK_SEND:
parse_option_decl(cfile, &config->send_options[0]);
-/* $OpenBSD: conflex.c,v 1.28 2014/01/19 03:54:25 krw Exp $ */
+/* $OpenBSD: conflex.c,v 1.29 2014/05/05 18:02:49 krw Exp $ */
/* Lexical scanner for dhclient config file. */
int l, p, u;
u = ugflag;
-
+
do {
l = line;
p = lpos - u;
-/* $OpenBSD: dhclient.c,v 1.302 2014/05/05 14:44:18 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.303 2014/05/05 18:02:49 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
options = lease->options;
set_lease_times(lease);
-
+
client->new->expiry = lease->expiry;
client->new->renewal = lease->renewal;
client->new->rebind = lease->rebind;
}
if (j < config->ignored_option_count)
continue;
-
+
switch (config->default_actions[i]) {
case ACTION_SUPERSEDE:
if (newlease->options[i].len != 0)
p = strsep(&ignore_list, ", ")) {
if (*p == '\0')
continue;
-
+
for (i = 1; i < DHO_END; i++)
if (!strcasecmp(dhcp_options[i].name, p))
break;
-/* $OpenBSD: dispatch.c,v 1.89 2014/02/18 01:46:58 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.90 2014/05/05 18:02:49 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
if (foo->sdl_alen != ETHER_ADDR_LEN)
continue;
-
+
ifi->index = foo->sdl_index;
memcpy(ifi->hw_address.ether_addr_octet, LLADDR(foo),
ETHER_ADDR_LEN);
ifa->ifa_name);
return (1);
}
-
+
/* Would my packets go out *his* interface? */
if (hisnet.s_addr == (myaddr.s_addr & hismask.s_addr)) {
note("interface %s already has the offered subnet!",
-/* $OpenBSD: kroute.c,v 1.64 2014/02/13 00:24:13 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.65 2014/05/05 18:02:49 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
iov[iovcnt].iov_base = &rtm;
iov[iovcnt++].iov_len = sizeof(rtm);
-
+
if (imsg->addrs & RTA_DST) {
memset(&dest, 0, sizeof(dest));
iov[iovcnt].iov_base = &dest;
iov[iovcnt++].iov_len = sizeof(dest);
}
-
+
if (imsg->addrs & RTA_GATEWAY) {
memset(&gateway, 0, sizeof(gateway));
iov[iovcnt].iov_base = &m_rtmsg.m_rtm;
iov[iovcnt++].iov_len = sizeof(m_rtmsg.m_rtm);
-
+
/* Set destination & netmask addresses of all zeros. */
m_rtmsg.m_rtm.rtm_addrs = RTA_DST | RTA_NETMASK;
-/* $OpenBSD: options.c,v 1.67 2014/01/21 03:07:50 krw Exp $ */
+/* $OpenBSD: options.c,v 1.68 2014/05/05 18:02:49 krw Exp $ */
/* DHCP options parsing and reassembly. */
break;
case 'C':
memset(&foo, 0, sizeof(foo));
- memcpy(&foo.s_addr, dp+1, (*dp + 7) / 8);
+ memcpy(&foo.s_addr, dp+1, (*dp + 7) / 8);
opcount = snprintf(op, opleft, "%s/%u",
- inet_ntoa(foo), *dp);
+ inet_ntoa(foo), *dp);
if (opcount >= opleft || opcount == -1)
goto toobig;
dp += 1 + (*dp + 7) / 8;
-/* $OpenBSD: parse.c,v 1.37 2014/01/21 03:07:50 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.38 2014/05/05 18:02:49 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
* bit-count :== 0..32
*/
int
-parse_cidr(FILE *cfile, unsigned char *cidr)
+parse_cidr(FILE *cfile, unsigned char *cidr)
{
struct in_addr addr;
int token;
skip_to_semi(cfile);
return;
}
-
+
*timep = betoh32(value);
parse_semi(cfile);
long long numval, low, high;
token = next_token(&val, cfile);
-
+
switch (fmt) {
case 'l': /* Signed 32-bit integer. */
low = INT32_MIN;
char *val, *ep;
int token;
unsigned long ulval;
-
+
token = next_token(&val, cfile);
errno = 0;
return (0);
buf[0] = ulval;
-
+
return (1);
}