Date: Mon, 8 Aug 2011 12:33:11 GMT From: Svatopluk Kraus <onwahe@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/159600: [patch] in_addprefix() - lookup by source address instead of destination one Message-ID: <201108081233.p78CXBfQ027704@red.freebsd.org> Resent-Message-ID: <201108081240.p78CeCbh069358@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 159600
>Category: kern
>Synopsis: [patch] in_addprefix() - lookup by source address instead of destination one
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 08 12:40:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Svatopluk Kraus
>Release: current
>Organization:
>Environment:
>Description:
If RTF_HOST flag is specified, then we are interested in destination address.
>How-To-Repeat:
>Fix:
Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c (revision 224705)
+++ sys/netinet/in.c (working copy)
@@ -1037,7 +1037,7 @@
IN_IFADDR_RLOCK();
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
if (rtinitflags(ia)) {
- p = ia->ia_addr.sin_addr;
+ p = ia->ia_dstaddr.sin_addr;
if (prefix.s_addr != p.s_addr)
continue;
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108081233.p78CXBfQ027704>
