summaryrefslogtreecommitdiffstats
path: root/if-linux.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-03-20 15:26:46 +0000
committerRoy Marples <roy@marples.name>2009-03-20 15:26:46 +0000
commitd7d07e5ae7dd3e5ec8868e19bc188cbe4a70b837 (patch)
tree7dede906a22fc7882721035a1351ff754b0ad766 /if-linux.c
parentda7e6aef0b0d5186738b9430201e783373efe7c8 (diff)
downloaddhcpcd-d7d07e5ae7dd3e5ec8868e19bc188cbe4a70b837.tar.xz
Allow dhcpcd to run on loopback interfaces if specified.
Diffstat (limited to 'if-linux.c')
-rw-r--r--if-linux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/if-linux.c b/if-linux.c
index ad58e2a9..d3bb88e8 100644
--- a/if-linux.c
+++ b/if-linux.c
@@ -561,6 +561,14 @@ discover_interfaces(int argc, char * const *argv)
continue;
}
if ((ifp = init_interface(p))) {
+ /* Don't allow loopback unless explicit */
+ if (ifp->flags & IFF_LOOPBACK &&
+ argc == 0 &&
+ ifdc == 0)
+ {
+ free_interface(ifp);
+ continue;
+ }
if (ifl)
ifl->next = ifp;
else