FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-06-2010, 06:16 PM
David Cantrell
 
Default Force interface up before checking link status (#549751). (cherry picked from commit 28bd273b78885b535c25fae6a20a964f21e77213)

---
isys/linkdetect.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/isys/linkdetect.c b/isys/linkdetect.c
index 1d1e33e..20877b3 100644
--- a/isys/linkdetect.c
+++ b/isys/linkdetect.c
@@ -130,6 +130,20 @@ int get_link_status(char * devname) {
return -1;
}

+ /* make sure interface is up and activated */
+ memset(&ifr, 0, sizeof(ifr));
+ strcpy(ifr.ifr_name, devname);
+
+ if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
+ return -1;
+ }
+
+ ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
+
+ if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0) {
+ return -1;
+ }
+
/* Setup our control structures. */
memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, devname);
--
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org