Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296084 Details for
Bug 435131
Xenner does not detect TAP device correctly, sometimes picking the bridge
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Change logic for detecting tap devices
xenner-mac.patch (text/plain), 1.22 KB, created by
Daniel Berrangé
on 2008-02-27 16:09:29 UTC
(
hide
)
Description:
Change logic for detecting tap devices
Filename:
MIME Type:
Creator:
Daniel Berrangé
Created:
2008-02-27 16:09:29 UTC
Size:
1.22 KB
patch
obsolete
>diff -rup xenner-0.25.orig/xenner.c xenner-0.25.new/xenner.c >--- xenner-0.25.orig/xenner.c 2008-02-01 10:59:37.000000000 -0500 >+++ xenner-0.25.new/xenner.c 2008-02-26 22:28:28.000000000 -0500 >@@ -209,7 +209,7 @@ static int tap_fd_to_name(int fd, char * > sock = socket(PF_INET, SOCK_STREAM, 0); > if (sock < 0) > goto out; >- for (ifn = 0; ifn < 65536; ifn++) { >+ for (ifn = 0; ifn < 65536 && ! match; ifn++) { > memset(&sys, 0, sizeof(sys)); > sys.ifr_ifindex = ifn; > if (ioctl(sock, SIOCGIFNAME, &sys) < 0) { >@@ -220,16 +220,19 @@ static int tap_fd_to_name(int fd, char * > if (ioctl(sock, SIOCGIFHWADDR, &sys) < 0) > goto out; > if (0 != memcmp(tun.ifr_hwaddr.sa_data, sys.ifr_hwaddr.sa_data, 6)) continue; >+ >+ /* We may match on a bridge device first, so >+ * TUNSETPERSIST is useful sanity check to let >+ * us distinguish the tap device from a bridge >+ * even though they MAC have same mac >+ */ >+ if (ioctl(fd, TUNSETPERSIST, 1) < 0) >+ continue; >+ > /* matched */ > strncpy(buf, sys.ifr_name, len); >- match++; >- } >- >- if (match) { >- /* make persist and close, so netbackd can open it by name */ >- ioctl(fd, TUNSETPERSIST, 1); > close(fd); >- goto out; >+ match = 1; > } > > out: >Only in xenner-0.25.new: xenner.c~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435131
: 296084