Delivered-To: dhcp-confidential@bugs.isc.org X-GM-Message-State: AElRT7GgL3cgKFnmvm9bbMyPedw2bu6+G+bNjIxueI8zR4EuuksPse6A kTYcv9d+xrJFYR12VHs6zcVez257iwM= From pzhukov@redhat.com Wed Mar 21 09:55:55 2018 MIME-Version: 1.0 Message-ID: <87a7v1lplj.fsf@pzhukov-workstation.usersys.redhat.com> X-Received: by 10.223.130.50 with SMTP id 47mr1616799wrb.99.1521626154074; Wed, 21 Mar 2018 02:55:54 -0700 (PDT) From: "Pavel Zhukov" X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.1 Subject: [Patch] get hardware addresses for all interfaces. Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.pao1.isc.org", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by bugs.isc.org (Postfix) with ESMTPS id BE41CD78B1E for ; Wed, 21 Mar 2018 09:55:55 +0000 (UTC) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 20E363AB05D for ; Wed, 21 Mar 2018 09:55:55 +0000 (UTC) Received: by mail-wr0-f182.google.com with SMTP id s10so4506966wra.13 for ; Wed, 21 Mar 2018 02:55:55 -0700 (PDT) Received: from pzhukov-workstation.usersys.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 96sm3293547wrk.54.2018.03.21.02.55.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Mar 2018 02:55:53 -0700 (PDT) Date: Wed, 21 Mar 2018 10:55:52 +0100 content-type: text/plain; charset="utf-8" Return-Path: X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=cs9JxfxpXpt9Ek5jQDqMrCIIiWiFFPgXDjSb7TuA208=; b=YIbzyYpGxPdiTpkO7R8OYPYbywnaaaDFrCfpA25NpuEGfPr7t8qZ+4Fy15C88AAgwv 4Z5GN4Pkvc9fS7saRfVt6Cl2NAWYTnNdsIyzzpn5XYOY8nu4UQQwTWkQr7Ha7Rgb5Ulw wgNm30RjgDr8v8I3o1OR4TYCgj68JNFmLckLC9SMvD0s2Ecqsy6/E7Nn+7CsLtmybiSo OcT9ujuWGebVOxsqboLShRACIxDpvvNtYiKPEeMNQSapwErWvjlf/BDEwEPYH913KCz7 xgc3L/xRqvIhdzEmJWNXWD+xjmddl+qkj2jNB8M77tI2eVmUTIgGD95F/K1rEJ/8dh3m AMoQ== X-RT-Incoming-Encryption: Not encrypted X-Google-SMTP-Source: AG47ELtHcGz3h1AUPWnKlPV2eD0RpO4Q1Ebc4VqZc55yJDjZAT4F6xqi6Np37yBtK915UJqEHAckng== X-Original-To: dhcp-confidential@bugs.isc.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.pao1.isc.org To: dhcp-bugs@isc.org X-RT-Original-Encoding: ascii X-RT-Interface: Email Content-Length: 1370 Hello, Seed generation in dhclient.c:832 (at the moment of writing) assumes hardware addresses for all interfaces are properly discovered and filled in into interfaces static variables. But if dhclient is used for IPv6 PD it's not the case because only interfaces used for PD itself is discovered. hw_addr field of others ones are zero'ed (which is the bug by itself). This becomes problem once ppp0 is used for ipv6 prefix delegation (with patch like https://src.fedoraproject.org/rpms/dhcp/blob/master/f/dhcp-PPP.patch) as the result duid of the system changes between restart which leads to network outage because ISP doesn't recognize the client properly. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=832712 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1163379 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1329210 This patch is probably related to [ISC-Bugs #38144]) and [ISC-Bugs #24249]) diff --git a/common/discover.c b/common/discover.c index 26a78ca..ed01e45 100644 --- a/common/discover.c +++ b/common/discover.c @@ -635,6 +635,8 @@ discover_interfaces(int state) { interface_dereference(&tmp, MDL); tmp = interfaces; /* XXX */ } + if (tmp != NULL) + get_hw_addr(tmp); if (dhcp_interface_discovery_hook) { (*dhcp_interface_discovery_hook)(tmp); -- PAVEL ZHUKOV SOFTWARE ENGINEER, RHCE, RHCVA Red Hat