Opened 5 years ago

Last modified 5 years ago

#3869 new enhancement

be flexible about the loopback interface name

Reported by: fdupont Owned by:
Priority: low Milestone: Windows
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


The fact Linux, BSD, etc, each uses a different name for the loopback interface is a mess which is not handled in a pretty way in the code, cf:

        if (if_nametoindex("lo") > 0) {
            snprintf(LOOPBACK, BUF_SIZE - 1, "lo");
        } else if (if_nametoindex("lo0") > 0) {
            snprintf(LOOPBACK, BUF_SIZE - 1, "lo0");
        } else {

I suggest:

  • get the loopback interface name in ./configure
  • use this kind of code to auto detect it
  • but for handling corner case, e.g., cross compiling offer a --with to force a value.

BTW one of the possible names is loopback_0 (:-).


Change History (2)

comment:1 Changed 5 years ago by tomek

  • Milestone changed from Kea-proposed to Windows

All systems that we're supporting have either lo or lo0 interface. You seem to be referring to windows, so moving to Windows milestone.

comment:2 Changed 5 years ago by fdupont

I disagree: lo and lo0 is one too many. So this ticket has a generic interest.

Note: See TracTickets for help on using tickets.