Initial commit
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
From b96002061178f399c1e58a9ad821e5096a64f788 Mon Sep 17 00:00:00 2001
|
||||
From: Murat Sezgin <msezgin@codeaurora.org>
|
||||
Date: Mon, 23 Mar 2020 10:59:39 -0700
|
||||
Subject: [qca-nss-ecm] Fix IPv6 neighbor solicitation request
|
||||
|
||||
Send the solicitation request to the GW address, when
|
||||
a GW address is found, while establishing the node instance.
|
||||
|
||||
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
||||
Change-Id: I2187569bcfd05b0d091cf8c79171ee3c41c39cb9
|
||||
---
|
||||
frontends/nss/ecm_nss_ipv6.c | 7 ++++---
|
||||
frontends/nss/ecm_nss_multicast_ipv6.c | 9 +++++++++
|
||||
frontends/sfe/ecm_sfe_ipv6.c | 7 ++++---
|
||||
3 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c
|
||||
index c7dd37f..9011e18 100644
|
||||
--- a/frontends/nss/ecm_nss_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv6.c
|
||||
@@ -527,13 +527,14 @@ struct ecm_db_node_instance *ecm_nss_ipv6_node_establish_and_ref(struct ecm_fron
|
||||
struct net_device *master;
|
||||
master = ecm_interface_get_and_hold_dev_master(dev);
|
||||
DEBUG_ASSERT(master, "Expected a master\n");
|
||||
- ecm_interface_send_neighbour_solicitation(master, addr);
|
||||
+ ecm_interface_send_neighbour_solicitation(master, gw_addr);
|
||||
dev_put(master);
|
||||
} else {
|
||||
- ecm_interface_send_neighbour_solicitation(dev, addr);
|
||||
+ ecm_interface_send_neighbour_solicitation(dev, gw_addr);
|
||||
}
|
||||
|
||||
- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr));
|
||||
+ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n",
|
||||
+ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr));
|
||||
return NULL;
|
||||
}
|
||||
done:
|
||||
diff --git a/frontends/nss/ecm_nss_multicast_ipv6.c b/frontends/nss/ecm_nss_multicast_ipv6.c
|
||||
index a361eec..38fde95 100644
|
||||
--- a/frontends/nss/ecm_nss_multicast_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_multicast_ipv6.c
|
||||
@@ -2558,6 +2558,15 @@ static struct ecm_db_node_instance *ecm_nss_multicast_ipv6_node_establish_and_re
|
||||
#endif
|
||||
if (!ecm_interface_mac_addr_get(addr, node_addr, &on_link, gw_addr)) {
|
||||
DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr));
|
||||
+
|
||||
+ /*
|
||||
+ * If there is a gw_addr found during the lookup, use that address
|
||||
+ * for neighbour solicitation request.
|
||||
+ */
|
||||
+ if (!ECM_IP_ADDR_IS_NULL(gw_addr)) {
|
||||
+ ECM_IP_ADDR_COPY(addr, gw_addr);
|
||||
+ }
|
||||
+
|
||||
if (ecm_front_end_is_bridge_port(dev)) {
|
||||
struct net_device *master;
|
||||
master = ecm_interface_get_and_hold_dev_master(dev);
|
||||
diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c
|
||||
index 3fd5d46..51a9ccb 100644
|
||||
--- a/frontends/sfe/ecm_sfe_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ipv6.c
|
||||
@@ -256,13 +256,14 @@ struct ecm_db_node_instance *ecm_sfe_ipv6_node_establish_and_ref(struct ecm_fron
|
||||
struct net_device *master;
|
||||
master = ecm_interface_get_and_hold_dev_master(dev);
|
||||
DEBUG_ASSERT(master, "Expected a master\n");
|
||||
- ecm_interface_send_neighbour_solicitation(master, addr);
|
||||
+ ecm_interface_send_neighbour_solicitation(master, gw_addr);
|
||||
dev_put(master);
|
||||
} else {
|
||||
- ecm_interface_send_neighbour_solicitation(dev, addr);
|
||||
+ ecm_interface_send_neighbour_solicitation(dev, gw_addr);
|
||||
}
|
||||
|
||||
- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr));
|
||||
+ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n",
|
||||
+ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr));
|
||||
return NULL;
|
||||
}
|
||||
done:
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
Reference in New Issue
Block a user