diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2017-05-18 20:23:18 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2017-05-18 20:23:18 +0200 |
commit | 8508ee43aeee58c57c51e22e5fb4c811cc5a99e6 (patch) | |
tree | 69a40081fc722130a89662fd918d127419ca65b2 | |
parent | 316a66bbaefb545c3b17a0b32b443f418fdb602c (diff) | |
download | isc-dhcp-8508ee43aeee58c57c51e22e5fb4c811cc5a99e6.tar.gz |
[19430] Preliminary support for loopback interfaces on Linux added.
-rw-r--r-- | common/lpf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/lpf.c b/common/lpf.c index ee3820b6..d95a92ac 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -548,6 +548,13 @@ get_hw_addr(const char *name, struct hardware *hw) { hw->hbuf[0] = HTYPE_FDDI; memcpy(&hw->hbuf[1], sa->sa_data, 6); break; + case ARPHRD_LOOPBACK: + /* Pretend loopback is a real interface and fake a + hardware address for it. */ + hw->hlen = 7; + hw->hbuf[0] = HTYPE_LOOPBACK; + memset(&hw->hbuf[1], 0, 6); + break; default: log_fatal("Unsupported device type %ld for \"%s\"", (long int)sa->sa_family, name); |