Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/dhcpcd/dist Import dhcpcd-5.6.7 with the follow...
details: https://anonhg.NetBSD.org/src/rev/2de0b7540766
branches: trunk
changeset: 784441:2de0b7540766
user: roy <roy%NetBSD.org@localhost>
date: Mon Jan 28 15:45:10 2013 +0000
description:
Import dhcpcd-5.6.7 with the following changes:
* Preserve space in static routes on the command line.
* Check correct interface the RAP came from; fixes PR bin/47433 thanks to
Taylor R Campbell
* Ensure the nooption works for IPv4 routes
diffstat:
external/bsd/dhcpcd/dist/configure.c | 7 +++----
external/bsd/dhcpcd/dist/defs.h | 2 +-
external/bsd/dhcpcd/dist/dhcp.h | 3 +--
external/bsd/dhcpcd/dist/if-options.c | 8 ++++++--
external/bsd/dhcpcd/dist/ipv6rs.c | 3 ++-
5 files changed, 13 insertions(+), 10 deletions(-)
diffs (102 lines):
diff -r f83b07fa45c8 -r 2de0b7540766 external/bsd/dhcpcd/dist/configure.c
--- a/external/bsd/dhcpcd/dist/configure.c Mon Jan 28 15:41:17 2013 +0000
+++ b/external/bsd/dhcpcd/dist/configure.c Mon Jan 28 15:45:10 2013 +0000
@@ -573,7 +573,7 @@
}
static struct rt *
-get_routes(const struct interface *iface)
+get_routes(struct interface *iface)
{
struct rt *rt, *nrt = NULL, *r = NULL;
@@ -596,8 +596,7 @@
return nrt;
}
- return get_option_routes(iface->state->new,
- iface->name, &iface->state->options->options);
+ return get_option_routes(iface, iface->state->new);
}
/* Some DHCP servers add set host routes by setting the gateway
@@ -687,7 +686,7 @@
build_routes(void)
{
struct rt *nrs = NULL, *dnr, *or, *rt, *rtn, *rtl, *lrt = NULL;
- const struct interface *ifp;
+ struct interface *ifp;
for (ifp = ifaces; ifp; ifp = ifp->next) {
if (ifp->state->new == NULL)
diff -r f83b07fa45c8 -r 2de0b7540766 external/bsd/dhcpcd/dist/defs.h
--- a/external/bsd/dhcpcd/dist/defs.h Mon Jan 28 15:41:17 2013 +0000
+++ b/external/bsd/dhcpcd/dist/defs.h Mon Jan 28 15:45:10 2013 +0000
@@ -28,7 +28,7 @@
#define CONFIG_H
#define PACKAGE "dhcpcd"
-#define VERSION "5.6.6"
+#define VERSION "5.6.7"
#ifndef CONFIG
# define CONFIG SYSCONFDIR "/" PACKAGE ".conf"
diff -r f83b07fa45c8 -r 2de0b7540766 external/bsd/dhcpcd/dist/dhcp.h
--- a/external/bsd/dhcpcd/dist/dhcp.h Mon Jan 28 15:41:17 2013 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp.h Mon Jan 28 15:45:10 2013 +0000
@@ -186,8 +186,7 @@
#define is_bootp(m) (m && \
!IN_LINKLOCAL(htonl((m)->yiaddr)) && \
get_option_uint8(NULL, m, DHO_MESSAGETYPE) == -1)
-struct rt *get_option_routes(const struct dhcp_message *, const char *,
- unsigned long long *);
+struct rt *get_option_routes(struct interface *, const struct dhcp_message *);
ssize_t decode_rfc3397(char *, ssize_t, int, const uint8_t *);
ssize_t print_string(char *, ssize_t, int, const uint8_t *);
ssize_t configure_env(char **, const char *, const struct dhcp_message *,
diff -r f83b07fa45c8 -r 2de0b7540766 external/bsd/dhcpcd/dist/if-options.c
--- a/external/bsd/dhcpcd/dist/if-options.c Mon Jan 28 15:41:17 2013 +0000
+++ b/external/bsd/dhcpcd/dist/if-options.c Mon Jan 28 15:45:10 2013 +0000
@@ -341,7 +341,7 @@
parse_option(struct if_options *ifo, int opt, const char *arg)
{
int i;
- char *p = NULL, *np;
+ char *p = NULL, *fp, *np;
ssize_t s;
struct in_addr addr, addr2;
struct rt *rt;
@@ -654,7 +654,7 @@
strncmp(arg, "classless_static_routes=", strlen("classless_static_routes=")) == 0 ||
strncmp(arg, "ms_classless_static_routes=", strlen("ms_classless_static_routes=")) == 0)
{
- np = strchr(p, ' ');
+ fp = np = strchr(p, ' ');
if (np == NULL) {
syslog(LOG_ERR, "all routes need a gateway");
return -1;
@@ -674,7 +674,11 @@
rt->next = NULL;
if (parse_addr(&rt->dest, &rt->net, p) == -1 ||
parse_addr(&rt->gate, NULL, np) == -1)
+ {
+ *fp = ' ';
return -1;
+ }
+ *fp = ' ';
} else if (strncmp(arg, "routers=", strlen("routers=")) == 0) {
if (ifo->routes == NULL) {
rt = ifo->routes = xzalloc(sizeof(*rt));
diff -r f83b07fa45c8 -r 2de0b7540766 external/bsd/dhcpcd/dist/ipv6rs.c
--- a/external/bsd/dhcpcd/dist/ipv6rs.c Mon Jan 28 15:41:17 2013 +0000
+++ b/external/bsd/dhcpcd/dist/ipv6rs.c Mon Jan 28 15:45:10 2013 +0000
@@ -463,7 +463,8 @@
return;
}
TAILQ_FOREACH(rap, &ipv6_routers, next) {
- if (memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,
+ if (ifp == rap->iface &&
+ memcmp(rap->from.s6_addr, from.sin6_addr.s6_addr,
sizeof(rap->from.s6_addr)) == 0)
break;
}
Home |
Main Index |
Thread Index |
Old Index