Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon cast to the correct messa...
details: https://anonhg.NetBSD.org/src/rev/63f17f169fff
branches: trunk
changeset: 373766:63f17f169fff
user: kardel <kardel%NetBSD.org@localhost>
date: Mon Feb 27 13:39:09 2023 +0000
description:
cast to the correct message structure (rt_msghdr instead of if_msghdr)
diffstat:
crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 8908c03366a0 -r 63f17f169fff crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
--- a/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c Mon Feb 27 08:29:36 2023 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c Mon Feb 27 13:39:09 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grabmyaddr.c,v 1.39 2020/11/25 14:15:41 christos Exp $ */
+/* $NetBSD: grabmyaddr.c,v 1.40 2023/02/27 13:39:09 kardel Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* Copyright (C) 2008 Timo Teras <timo.teras%iki.fi@localhost>.
@@ -849,7 +849,7 @@
{
caddr_t ref, buf, end;
size_t bufsiz;
- struct if_msghdr *ifm;
+ struct rt_msghdr *rtm;
#define MIBSIZ 6
int mib[MIBSIZ] = {
@@ -871,8 +871,10 @@
if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) >= 0) {
/* Parse both interfaces and addresses. */
- for (end = buf + bufsiz; buf < end; buf += ifm->ifm_msglen) {
- ifm = (struct if_msghdr *) buf;
+ for (end = buf + bufsiz; buf < end; buf += rtm->rtm_msglen) {
+ rtm = (struct rt_msghdr *) buf;
+ if (rtm->rtm_version != RTM_VERSION)
+ continue;
kernel_handle_message(buf);
}
} else {
Home |
Main Index |
Thread Index |
Old Index