Bug 559147 - dhclient did not send a Decline msg when find address already used on the link
dhclient did not send a Decline msg when find address already used on the link
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 559403
  Show dependency treegraph
 
Reported: 2010-01-27 04:33 EST by Yang Ren
Modified: 2014-08-25 12:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: dhcp-4.1.1-13.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 559403 (view as bug list)
Environment:
Last Closed: 2010-04-22 18:34:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Comment 1 Jiri Popelka 2010-02-15 11:22:07 EST
I tried to ask upstream (dhcp-workers mailing list)
https://lists.isc.org/pipermail/dhcp-workers/2010-February/000108.html
but no answer.
Comment 2 Herbert Xu 2010-03-13 06:14:36 EST
DAD is performed by the kernel.  So you'll need to query the kernel to figure out what is going on.  I have sent a patch to make the kernel send a notification when DAD fails.  The kernel will also send a notification when DAD succeeds.

So you could either listen to those notifications, or just poll the kernel at set intervals.
Comment 3 Yang Ren 2010-03-18 03:12:21 EDT
kernel already passed the test:
Section 3: RFC 4862 - IPv6 Stateless Address Autoconfiguration
That means kernel can deal with DAD correctly.

SO the problem should be how our dhclient discover address duplicate on the link. It's easy to send the Declient msg. But if only client know address duplicate. client will not do it.
Comment 4 Herbert Xu 2010-03-18 03:38:29 EDT
The idea is to get the dhclient shell script to either wait for a notification from the kernel, at which point it can send a decline message if the kernel DAD had failed, or for it to poll the kernel at set intervals to determine whether DAD succeeded or failed.
Comment 5 Jiri Popelka 2010-03-23 13:33:56 EDT
(In reply to comment #4)
> The idea is to get the dhclient shell script to either wait for a notification
> from the kernel, at which point it can send a decline message if the kernel DAD
> had failed, or for it to poll the kernel at set intervals to determine whether
> DAD succeeded or failed.    

Hi Herbert,
thanks for your advices.
I found that 'ip addr show' shows 'tentative' flag in address info when DAD is still not complete or failed. So I use this code in dhclient-script to check whether the address passed DAD:

ip -f inet6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
                     dev ${interface} scope global

# repeatedly test whether newly added address passed
# duplicate address detection (DAD)
for i in $(seq 5); do
  sleep 1 # give the DAD some time

  # tentative flag = DAD is still not complete or failed
  duplicate=$(ip -6 addr show dev ${interface} tentative \
             | grep ${new_ip6_address}/${new_ip6_prefixlen})

  # if there's no tentative flag, address passed DAD
  if [ -z "${duplicate}" ]; then
    break
  fi
done

# if there's still tentative flag = address didn't pass DAD = it's duplicate = remove it and exit with error
if [ -n "${duplicate}" ]; then
  ip -6 addr del ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface}
  exit_with_hooks 3
fi
Comment 6 Fedora Update System 2010-03-24 07:20:40 EDT
dhcp-4.1.1-14.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/dhcp-4.1.1-14.fc13
Comment 7 Fedora Update System 2010-03-24 07:22:47 EDT
dhcp-4.1.1-12.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/dhcp-4.1.1-12.fc12
Comment 8 Fedora Update System 2010-03-24 19:29:27 EDT
dhcp-4.1.1-12.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dhcp'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/dhcp-4.1.1-12.fc12
Comment 9 Yang Ren 2010-03-26 01:15:51 EDT
Verified in dhcp-4.1.1-12.fc12
Comment 10 Fedora Update System 2010-03-26 21:01:35 EDT
dhcp-4.1.1-13.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dhcp'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/dhcp-4.1.1-13.fc12
Comment 11 Fedora Update System 2010-04-21 17:51:41 EDT
dhcp-4.1.1-15.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2010-04-22 18:33:59 EDT
dhcp-4.1.1-13.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.