mirror of
https://github.com/openharmony/kernel_common_modules_newip.git
synced 2026-07-19 16:43:31 -04:00
!54 newip内核插桩方式整改(SIOCGIFCONF)
Merge pull request !54 from tangruifeng/master
This commit is contained in:
@@ -20,7 +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)
|
||||
{
|
||||
*ret = ninet_gifconf(dev, buf, len, size);
|
||||
if (*ret >= 0) {
|
||||
int done = ninet_gifconf(dev, buf + *ret, len - *ret, size);
|
||||
|
||||
if (done < 0)
|
||||
*ret = done;
|
||||
else
|
||||
*ret += done;
|
||||
}
|
||||
}
|
||||
|
||||
int ninet_hooks_register(void)
|
||||
|
||||
Reference in New Issue
Block a user