]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Clarify hop limit
authorRoy Marples <roy@marples.name>
Wed, 12 Mar 2014 00:50:02 +0000 (00:50 +0000)
committerRoy Marples <roy@marples.name>
Wed, 12 Mar 2014 00:50:02 +0000 (00:50 +0000)
dhcp6.c
ipv6.h
ipv6nd.c

diff --git a/dhcp6.c b/dhcp6.c
index 5a1a40412c6595fe39a0b2c90c7eb59221407c9a..853cf7d5e3c260d61311a610fe2e0e5de3f28b3f 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -713,7 +713,7 @@ dhcp6_sendmessage(struct interface *ifp, void (*callback)(void *))
        uint8_t neg;
        const char *broad_uni;
        const struct in6_addr alldhcp = IN6ADDR_LINKLOCAL_ALLDHCP_INIT;
-       int hoplimit = HOPLIMIT;
+       int hoplimit = 1; /* Relay agents bump this up */
 
        memset(&dst, 0, sizeof(dst));
        dst.sin6_family = AF_INET6;
diff --git a/ipv6.h b/ipv6.h
index 2e9f7f9d792cd6e405e9f6c0e1c1ff1bdc99b6c7..62c9573329d4cb7694949e659e0ba58955a7886a 100644 (file)
--- a/ipv6.h
+++ b/ipv6.h
@@ -41,7 +41,6 @@
 #include "dhcpcd.h"
 
 #define ALLROUTERS "ff02::2"
-#define HOPLIMIT 255
 
 #define ROUNDUP8(a) (1 + (((a) - 1) | 7))
 
index 74500b296883d749214dd4ce1f50d824e655b3ff..d60e0979dad68e862331a16f7bb26559e8ca4c66 100644 (file)
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -247,7 +247,7 @@ ipv6nd_sendrsprobe(void *arg)
        struct sockaddr_in6 dst;
        struct cmsghdr *cm;
        struct in6_pktinfo pi;
-       int hoplimit = HOPLIMIT;
+       int hoplimit = 255; /* RFC4861 4.1 */
 
        if (ipv6_linklocal(ifp) == NULL) {
                syslog(LOG_DEBUG,
@@ -1245,7 +1245,7 @@ ipv6nd_proberouter(void *arg)
        struct sockaddr_in6 dst;
        struct cmsghdr *cm;
        struct in6_pktinfo pi;
-       int hoplimit = HOPLIMIT;
+       int hoplimit = 255; /* RFC4861 4.1 */
        struct timeval tv, rtv;
        struct ipv6_ctx *ctx;