mirror of
https://github.com/openharmony/kernel_common_modules_newip.git
synced 2026-07-19 16:43:31 -04:00
newip内核插桩方式整改(SIOCGIFCONF)
Signed-off-by: liangbotong <liangbotong@huawei.com>
This commit is contained in:
@@ -20,12 +20,14 @@ void ninet_ehashfn_hook(void *data, const struct sock *sk, u32 *ret)
|
||||
void ninet_gifconf_hook(void *data, struct net_device *dev,
|
||||
char __user *buf, int len, int size, int *ret)
|
||||
{
|
||||
int done = ninet_gifconf(dev, buf + *ret, len - *ret, size);
|
||||
if (*ret >= 0) {
|
||||
int done = ninet_gifconf(dev, buf + *ret, len - *ret, size);
|
||||
|
||||
if (done < 0)
|
||||
*ret = done;
|
||||
else
|
||||
*ret += done;
|
||||
if (done < 0)
|
||||
*ret = done;
|
||||
else
|
||||
*ret += done;
|
||||
}
|
||||
}
|
||||
|
||||
int ninet_hooks_register(void)
|
||||
|
||||
Reference in New Issue
Block a user