mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 16:57:29 +00:00
52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
--- a/ecm_interface.c
|
|
+++ b/ecm_interface.c
|
|
@@ -336,7 +336,7 @@ static struct net_device *ecm_interface_
|
|
struct net_device *dev;
|
|
|
|
ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr);
|
|
- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1);
|
|
+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1);
|
|
return dev;
|
|
}
|
|
#endif
|
|
@@ -779,7 +779,7 @@ static bool ecm_interface_mac_addr_get_i
|
|
* Get the MAC address that corresponds to IP address given.
|
|
*/
|
|
ECM_IP_ADDR_TO_NIN6_ADDR(daddr, addr);
|
|
- local_dev = ipv6_dev_find(&init_net, &daddr, 1);
|
|
+ local_dev = ipv6_dev_find_and_hold(&init_net, &daddr, 1);
|
|
if (local_dev) {
|
|
DEBUG_TRACE("%pi6 is a local address\n", &daddr);
|
|
memcpy(mac_addr, dev->dev_addr, ETH_ALEN);
|
|
--- a/frontends/ecm_front_end_common.c
|
|
+++ b/frontends/ecm_front_end_common.c
|
|
@@ -102,6 +102,10 @@
|
|
#endif
|
|
#endif
|
|
|
|
+#ifdef ECM_IPV6_ENABLE
|
|
+#include "ecm_front_end_ipv6.h"
|
|
+#endif
|
|
+
|
|
/*
|
|
* Sysctl table header
|
|
*/
|
|
@@ -578,7 +582,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
|
}
|
|
} else {
|
|
#ifdef ECM_IPV6_ENABLE
|
|
- dev = ipv6_dev_find(&init_net, &(tuple->src.u3.in6), 1);
|
|
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->src.u3.in6), 1);
|
|
if (dev) {
|
|
/*
|
|
* Source IP address is local
|
|
@@ -588,7 +592,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
|
return false;
|
|
}
|
|
|
|
- dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1);
|
|
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1);
|
|
if (dev) {
|
|
/*
|
|
* Destination IP address is local
|