Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Default netmask to /32 for INET on POINTOPOINT l...
details: https://anonhg.NetBSD.org/src/rev/044ffb88689f
branches: trunk
changeset: 348035:044ffb88689f
user: roy <roy%NetBSD.org@localhost>
date: Sat Oct 01 17:17:20 2016 +0000
description:
Default netmask to /32 for INET on POINTOPOINT links if not specified.
diffstat:
sys/netinet/in.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 5f764fdf27b3 -r 044ffb88689f sys/netinet/in.c
--- a/sys/netinet/in.c Sat Oct 01 15:35:22 2016 +0000
+++ b/sys/netinet/in.c Sat Oct 01 17:17:20 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.185 2016/09/29 15:18:18 roy Exp $ */
+/* $NetBSD: in.c,v 1.186 2016/10/01 17:17:20 roy Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.185 2016/09/29 15:18:18 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.186 2016/10/01 17:17:20 roy Exp $");
#include "arp.h"
@@ -1122,7 +1122,9 @@
in_ifaddlocal(&ia->ia_ifa);
i = ia->ia_addr.sin_addr.s_addr;
- if (IN_CLASSA(i))
+ if (ifp->if_flags & IFF_POINTOPOINT)
+ ia->ia_netmask = INADDR_BROADCAST; /* default to /32 */
+ else if (IN_CLASSA(i))
ia->ia_netmask = IN_CLASSA_NET;
else if (IN_CLASSB(i))
ia->ia_netmask = IN_CLASSB_NET;
Home |
Main Index |
Thread Index |
Old Index