[OpenWrt-Devel] 回复: [PATCH] interface-ip: fix find locally addressable target for p2p

Tan Xiaofan xfan1024 at live.com
Thu May 16 07:27:39 PDT 2019


Fix code style

From 5ab54a6b1fd4c4a721e66727a135b5c03051224e Mon Sep 17 00:00:00 2001
From: xiaofan <xfan1024 at live.com>
Date: Thu, 16 May 2019 21:12:47 +0800
Subject: [PATCH] interface-ip: fix find locally addressable target for p2p

Signed-off-by: xiaofan <xfan1024 at live.com>
---
 interface-ip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/interface-ip.c b/interface-ip.c
index 6900cd7..8d5587c 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -196,6 +196,9 @@ __find_ip_addr_target(struct interface_ip_settings *ip, union if_addr *a, bool v
   if (v6 != ((addr->flags & DEVADDR_FAMILY) == DEVADDR_INET6))
    continue;

+  if (!v6 && addr->point_to_point && a->in.s_addr == addr->point_to_point)
+   return true;
+
   /* Handle offlink addresses correctly */
   unsigned int mask = addr->mask;
   if ((addr->flags & DEVADDR_FAMILY) == DEVADDR_INET6 &&
--
2.17.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190516/f9ecf996/attachment.html>


More information about the openwrt-devel mailing list