Module Name:    src
Committed By:   kefren
Date:           Sat Jan 22 19:46:46 UTC 2011

Modified Files:
        src/usr.sbin/ldpd: socketops.c

Log Message:
avoid advertising 0/8 transport address (conforming RFC1122
Section 3.2.1.3)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/socketops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.4 src/usr.sbin/ldpd/socketops.c:1.5
--- src/usr.sbin/ldpd/socketops.c:1.4	Sat Jan 22 19:35:00 2011
+++ src/usr.sbin/ldpd/socketops.c	Sat Jan 22 19:46:46 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.4 2011/01/22 19:35:00 kefren Exp $ */
+/* $NetBSD: socketops.c,v 1.5 2011/01/22 19:46:46 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -311,7 +311,8 @@
 		if_sa = (struct sockaddr_in *) ifb->ifa_addr;
 		if (if_sa->sin_family != AF_INET)
 			continue;
-		if (ntohl(if_sa->sin_addr.s_addr) >> 24 == IN_LOOPBACKNET)
+		if (ntohl(if_sa->sin_addr.s_addr) >> 24 == IN_LOOPBACKNET ||
+		    ntohl(if_sa->sin_addr.s_addr) >> 24 == 0)
 			continue;
 		/* Send only once per interface, using master address */
 		if (strcmp(ifb->ifa_name, lastifname) == 0)

Reply via email to