All of lore.kernel.org
 help / color / mirror / Atom feed
* get_proximity() crashes on interfaces with no addresses
@ 2013-05-12 15:48 Doug Nazar
  2013-05-12 18:26 ` Leonardo Chiquitto
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Nazar @ 2013-05-12 15:48 UTC (permalink / raw)
  To: autofs

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

Since commit aa6f7793 [autofs-5.0.7 - fix ipv6 proximity calculation] 
uses getifaddrs however it crashes on interfaces with no addresses. Fix 
the NULL check to ignore interfaces with no addresses.

Should it also check for the IFF_UP flag?

Doug


[-- Attachment #2: autofs-5.0.7-fix-interface-address-null-check.patch --]
[-- Type: text/plain, Size: 667 bytes --]

diff -ur autofs-5.0.7.orig/modules/replicated.c autofs-5.0.7/modules/replicated.c
--- autofs-5.0.7.orig/modules/replicated.c	2013-05-10 04:48:32.000000000 -0400
+++ autofs-5.0.7/modules/replicated.c	2013-05-10 04:50:07.000000000 -0400
@@ -166,7 +166,7 @@
 	this = ifa;
 	while (this) {
 		if (this->ifa_flags & IFF_POINTOPOINT ||
-		    this->ifa_addr->sa_data == NULL) {
+		    this->ifa_addr == NULL) {
 			this = this->ifa_next;
 			continue;
 		}
@@ -203,7 +203,7 @@
 	this = ifa;
 	while (this) {
 		if (this->ifa_flags & IFF_POINTOPOINT ||
-		    this->ifa_addr->sa_data == NULL) {
+		    this->ifa_addr == NULL) {
 			this = this->ifa_next;
 			continue;
 		}

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-16  0:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-12 15:48 get_proximity() crashes on interfaces with no addresses Doug Nazar
2013-05-12 18:26 ` Leonardo Chiquitto
2013-05-12 20:31   ` Doug Nazar
2013-05-14  4:13     ` Ian Kent
2013-05-14  9:15       ` Doug Nazar
2013-05-16  0:45         ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.