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 312347 Details for
Bug 456248
DNS outage can cause cluster to die
[?]
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]
Shortcuts DNS lookup if the IP tiebreaker is in dotted quad form
clumanager-1.2.37-ping-dns.patch (text/plain), 1.37 KB, created by
Lon Hohberger
on 2008-07-22 14:10:36 UTC
(
hide
)
Description:
Shortcuts DNS lookup if the IP tiebreaker is in dotted quad form
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2008-07-22 14:10:36 UTC
Size:
1.37 KB
patch
obsolete
>Index: src/clulib/ping.c >=================================================================== >RCS file: /cvs/devel/clumanager/src/clulib/ping.c,v >retrieving revision 1.6 >diff -u -p -r1.6 ping.c >--- src/clulib/ping.c 16 Dec 2004 19:41:21 -0000 1.6 >+++ src/clulib/ping.c 22 Jul 2008 13:46:10 -0000 >@@ -25,6 +25,7 @@ > */ > > #include <ping.h> >+#include <ctype.h> > > /** > * From RFC 777: >@@ -92,6 +93,23 @@ icmp_ping_getaddr(char *hostname, struct > { > struct hostent *hp; > >+ memset(sin_send, 0, sizeof(*sin_send)); >+ sin_send->sin_family = AF_INET; >+ sin_send->sin_port = 0; >+ >+ /* >+ * Don't do a DNS lookup if someone gave us an address in dotted >+ * quad format; it's a waste of time and slows things down >+ * >+ * Per the man page, host names "must begin with alphabetic and end >+ * with an alphanumeric character". Ergo, if it begins with a digit, >+ * it is probably an address in dotted-quad form. >+ */ >+ if (isdigit(hostname[0]) && >+ inet_pton(AF_INET, hostname, &sin_send->sin_addr) > 0) { >+ return 0; >+ } >+ > /* > * Grab the hostname > */ >@@ -108,11 +126,8 @@ icmp_ping_getaddr(char *hostname, struct > } > > /* >- * Set up send address >+ * Copy in target address from DNS/hosts/etc. > */ >- memset(sin_send, 0, sizeof(*sin_send)); >- sin_send->sin_family = AF_INET; >- sin_send->sin_port = 0; > memcpy(&sin_send->sin_addr, hp->h_addr, sizeof(sin_send->sin_addr)); > > return 0;
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 456248
: 312347