Opened 3 years ago

Closed 3 years ago

#3691 closed defect (fixed)

MAC in DHCPv6 method "ipv6-link-local" not working

Reported by: wlodekwencel Owned by: tmark
Priority: medium Milestone: Kea0.9.1
Component: dhcp6 Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 4 Internal?: no

Description

In "ipv6-link-local" method Kea extract MAC address from IPv6 address if clients are sending their packets from IPv6 link-local addresses and this address is based on EUI-64.

Sending message from source address fe80::800:27ff:fe00:1 should result with saving leases with MAC: 0A:00:27:00:00:01 but it's not.

Attached:

  • kea config file
  • message capture
  • kea log file
  • kea leases file (has no hwaddr value)

Subtickets

Attachments (4)

capture.pcap (2.1 KB) - added by wlodekwencel 3 years ago.
configuration_file (941 bytes) - added by wlodekwencel 3 years ago.
kea_leases.csv (199 bytes) - added by wlodekwencel 3 years ago.
log_file (12.6 KB) - added by wlodekwencel 3 years ago.

Download all attachments as: .zip

Change History (16)

Changed 3 years ago by wlodekwencel

Changed 3 years ago by wlodekwencel

Changed 3 years ago by wlodekwencel

Changed 3 years ago by wlodekwencel

comment:1 Changed 3 years ago by tomek

  • Milestone changed from Kea-proposed to Kea0.9.1

comment:2 Changed 3 years ago by tomek

  • Milestone changed from Kea0.9.1beta to Kea0.9.1

comment:3 Changed 3 years ago by tomek

  • Summary changed from MAC in DHCPv6 method "ipv6-link-local" not wroking to MAC in DHCPv6 method "ipv6-link-local" not working

comment:4 Changed 3 years ago by fdupont

Is fe80::800:27ff:fe00:1 a valid EUI-64 link-local address? IMHO it is not.

comment:5 Changed 3 years ago by tmark

  • Owner set to tmark
  • Status changed from new to assigned

comment:6 Changed 3 years ago by tmark

The code, pkt.c::getMACFromIPv6() actually functions as designed. It only succeeds in extracting the MAC address if the u-bit is 1 and the g-bit is 0, see RFC 2373 section 2.5.1. The issue is that the client's interface is a host-only-network interface created by VirtualBox? and the u-bit of its link-local address is set to zero.

This ticket will be addressed by documenting the precise behavior in the Kea Admin guide. A separate ticket to add a more liberal handling will be created.

comment:7 Changed 3 years ago by tmark

Kea guide has been amended, git commit# e25bab022a4590333bf61f9a5fc144426f4f8765

A new ticket, #3751, has been created which calls for additional flexibility.

Ticket is ready for review.

comment:8 Changed 3 years ago by tmark

  • Owner changed from tmark to UnAssigned
  • Status changed from assigned to reviewing
  • Total Hours changed from 0 to 3

comment:9 Changed 3 years ago by fdupont

I like the idea of the changes but have some concern about its wording. I suggest to give the ticket to Stephen if he is available so he can improve the language.
Another point: can lines be wrapped to 80 columns or less?

comment:10 Changed 3 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:11 Changed 3 years ago by stephen

  • Owner changed from stephen to tmark

Reviewed commit e25bab022a4590333bf61f9a5fc144426f4f8765

I suggest slight revision to the text, namely:

Also note that successful extraction requires that the address's u-bit
be set to 1 and its g-bit set to 0, an indication that it is an interface
identifier as per RFC 2373 section 2.5.1.

(The original text seemed to give directions as how how to successfully extract the address's u-bit.)

As this is a user-visible change, it requires a ChangeLog entry. Something simple such as

Added description of a restriction on extracting a MAC address
from an IPv6 link-local address.

I don't need to see this again, please merge.

comment:12 Changed 3 years ago by tmark

  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Total Hours changed from 3 to 4

Content amended per Stephen's suggestion.
Changes merged in with git ca9f5541cb36f815ac614c5c21088d545eafcac6.
Added ChangeLog? entry 906.

Note: See TracTickets for help on using tickets.