diff options
author | Thomas Markwalder <tmark@isc.org> | 2015-01-19 13:25:18 -0500 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2015-01-19 13:25:18 -0500 |
commit | c2b5b5e8d424aecf8ea2bd9fc0c48d3de7fd77c2 (patch) | |
tree | fe26d138feb5ec393c1868709ff75f8c1ee29b80 /relay | |
parent | 7e35d5b1a2d156b5a279871108b11889936ffaaf (diff) | |
download | isc-dhcp-c2b5b5e8d424aecf8ea2bd9fc0c48d3de7fd77c2.tar.gz |
[master] Fixed inconsistencies in setting hop count limit in dhcrelay
Merges in rt37426.
Diffstat (limited to 'relay')
-rw-r--r-- | relay/dhcrelay.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index 4da7e864..4d1d6fd2 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -1192,8 +1192,8 @@ parse_downstream(char *arg) { /* Share with up side? */ for (up = upstreams; up; up = up->next) { if (strcmp(ifname, up->ifp->name) == 0) { - log_info("Interface '%s' is both down and up.", - ifname); + log_info("parse_downstream: Interface '%s' is " + "both down and up.", ifname); ifp = up->ifp; break; } @@ -1211,8 +1211,8 @@ parse_downstream(char *arg) { interface_dereference(&interfaces, MDL); } interface_reference(&interfaces, ifp, MDL); - ifp->flags |= INTERFACE_REQUESTED | INTERFACE_DOWNSTREAM; } + ifp->flags |= INTERFACE_REQUESTED | INTERFACE_DOWNSTREAM; /* New downstream. */ dp = (struct stream_list *) dmalloc(sizeof(*dp), MDL); @@ -1263,6 +1263,8 @@ parse_upstream(char *arg) { } for (dp = downstreams; dp; dp = dp->next) { if (strcmp(ifname, dp->ifp->name) == 0) { + log_info("parse_upstream: Interface '%s' is " + "both down and up.", ifname); ifp = dp->ifp; break; } @@ -1280,8 +1282,8 @@ parse_upstream(char *arg) { interface_dereference(&interfaces, MDL); } interface_reference(&interfaces, ifp, MDL); - ifp->flags |= INTERFACE_REQUESTED | INTERFACE_UPSTREAM; } + ifp->flags |= INTERFACE_REQUESTED | INTERFACE_UPSTREAM; /* New upstream. */ up = (struct stream_list *) dmalloc(sizeof(*up), MDL); @@ -1349,6 +1351,13 @@ setup_streams(void) { if (up->ifp->v6address_count == 0) log_fatal("Interface '%s' has no IPv6 addresses.", up->ifp->name); + + /* RFC 3315 Sec 20 - "If the relay agent relays messages to + * the All_DHCP_Servers address or other multicast addresses, + * it sets the Hop Limit field to 32." */ + if (IN6_IS_ADDR_MULTICAST(&up->link.sin6_addr)) { + set_multicast_hop_limit(up->ifp, HOP_COUNT_LIMIT); + } } } |