Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Fix in_lltable_match_prefix
details: https://anonhg.NetBSD.org/src/rev/624e193b44fa
branches: trunk
changeset: 354576:624e193b44fa
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Jun 22 09:23:10 2017 +0000
description:
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
diffstat:
sys/netinet/in.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 60d195686917 -r 624e193b44fa sys/netinet/in.c
--- a/sys/netinet/in.c Thu Jun 22 09:05:09 2017 +0000
+++ b/sys/netinet/in.c Thu Jun 22 09:23:10 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.203 2017/06/01 02:45:14 chs Exp $ */
+/* $NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r 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.203 2017/06/01 02:45:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.204 2017/06/22 09:23:10 ozaki-r Exp $");
#include "arp.h"
@@ -1896,12 +1896,15 @@
{
const struct sockaddr_in *pfx = (const struct sockaddr_in *)prefix;
const struct sockaddr_in *msk = (const struct sockaddr_in *)mask;
+ struct in_addr lle_addr;
+
+ lle_addr.s_addr = ntohl(lle->r_l3addr.addr4.s_addr);
/*
* (flags & LLE_STATIC) means deleting all entries
* including static ARP entries.
*/
- if (IN_ARE_MASKED_ADDR_EQUAL(lle->r_l3addr.addr4, pfx, msk) &&
+ if (IN_ARE_MASKED_ADDR_EQUAL(lle_addr, pfx, msk) &&
((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC)))
return (1);
Home |
Main Index |
Thread Index |
Old Index