X-Original-To: alpine-aports@lists.alpinelinux.org Received: from anomx-md.ovpn.to (anomx.ovpn.to [178.17.171.134]) by lists.alpinelinux.org (Postfix) with ESMTP id 0BF445C5122 for ; Sat, 23 Jun 2018 20:26:31 +0000 (GMT) Received: from anomx.ovpn.to (unknown [IPv6:fd48:8bea:68a5:aaaa::aa01]) by anomx-md.ovpn.to (Postfix) with ESMTPS id 2EBD21DDC7 for ; Sat, 23 Jun 2018 20:26:29 +0000 (UTC) Received: from localhost (anomx.ovpn.to [127.0.0.1]) by anomx.ovpn.to (Postfix) with ESMTP id 35B53C072A for ; Sat, 23 Jun 2018 22:26:28 +0200 (CEST) Received: from anomx.ovpn.to ([127.0.0.1]) by localhost (anomx.ovpn.to [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o7dRMyCB7eBx for ; Sat, 23 Jun 2018 22:26:17 +0200 (CEST) From: Tyler A To: alpine-aports@lists.alpinelinux.org Cc: Tyler A Subject: [alpine-aports] [PATCH] main/dhcpcd: Fixes link local addresses being deleted on VLAN interfaces. Date: Sun, 24 Jun 2018 05:55:32 +0930 Message-Id: <20180623202532.2303-1-tylera@privatedemail.net> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Patch from upstream, will appear in next release. Written by Roy Marples. --- main/dhcpcd/dhcpcd-slaac-vlanid.patch | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 main/dhcpcd/dhcpcd-slaac-vlanid.patch diff --git a/main/dhcpcd/dhcpcd-slaac-vlanid.patch b/main/dhcpcd/dhcpcd-slaac-vlanid.patch new file mode 100644 index 0000000000..57390a9448 --- /dev/null +++ b/main/dhcpcd/dhcpcd-slaac-vlanid.patch @@ -0,0 +1,43 @@ +diff --git a/src/ipv6.c b/src/ipv6.c +index b3b026b3..2d516d99 100644 +--- a/src/ipv6.c ++++ b/src/ipv6.c +@@ -253,6 +253,7 @@ ipv6_makestableprivate1(struct in6_addr *addr, + const struct in6_addr *prefix, int prefix_len, + const unsigned char *netiface, size_t netiface_len, + const unsigned char *netid, size_t netid_len, ++ unsigned short vlanid, + uint32_t *dad_counter, + const unsigned char *secret, size_t secret_len) + { +@@ -267,6 +268,8 @@ ipv6_makestableprivate1(struct in6_addr *addr, + + l = (size_t)(ROUNDUP8(prefix_len) / NBBY); + len = l + netiface_len + netid_len + sizeof(*dad_counter) + secret_len; ++ if (vlanid != 0) ++ len += sizeof(vlanid); + if (len > sizeof(buf)) { + errno = ENOBUFS; + return -1; +@@ -281,6 +284,12 @@ ipv6_makestableprivate1(struct in6_addr *addr, + p += netiface_len; + memcpy(p, netid, netid_len); + p += netid_len; ++ /* Don't use a vlanid if not set. ++ * This ensures prior versions have the same unique address. */ ++ if (vlanid != 0) { ++ memcpy(p, &vlanid, sizeof(vlanid)); ++ p += sizeof(vlanid); ++ } + memcpy(p, dad_counter, sizeof(*dad_counter)); + p += sizeof(*dad_counter); + memcpy(p, secret, secret_len); +@@ -333,7 +342,7 @@ ipv6_makestableprivate(struct in6_addr *addr, + r = ipv6_makestableprivate1(addr, prefix, prefix_len, + ifp->hwaddr, ifp->hwlen, + ifp->ssid, ifp->ssid_len, +- &dad, ++ ifp->vlanid, &dad, + ifp->ctx->secret, ifp->ctx->secret_len); + + if (r == 0) -- 2.18.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---