Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet don't panic when there's no interface address ex...
details: https://anonhg.NetBSD.org/src/rev/29c06d7cd95b
branches: trunk
changeset: 520359:29c06d7cd95b
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Jan 08 10:05:13 2002 +0000
description:
don't panic when there's no interface address exist for the specified multicast
outgoing interface (ia == NULL after IFP_TO_IA).
historic behavior (up to revision 1.43) was to use 0.0.0.0 as source address,
but it seems like a mistake according to RFC1112/1122.
diffstat:
sys/netinet/ip_output.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 3beee7c8003a -r 29c06d7cd95b sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Tue Jan 08 06:58:32 2002 +0000
+++ b/sys/netinet/ip_output.c Tue Jan 08 10:05:13 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.90 2001/11/21 06:28:08 itojun Exp $ */
+/* $NetBSD: ip_output.c,v 1.91 2002/01/08 10:05:13 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.90 2001/11/21 06:28:08 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.91 2002/01/08 10:05:13 itojun Exp $");
#include "opt_pfil_hooks.h"
#include "opt_ipsec.h"
@@ -317,6 +317,10 @@
struct in_ifaddr *ia;
IFP_TO_IA(ifp, ia);
+ if (!ia) {
+ error = EADDRNOTAVAIL;
+ goto bad;
+ }
ip->ip_src = ia->ia_addr.sin_addr;
}
Home |
Main Index |
Thread Index |
Old Index