Some cleanups in krt_read_ifinfo().
This commit is contained in:
parent
dad7ee70c1
commit
d32a071da9
1 changed files with 4 additions and 4 deletions
|
@ -414,16 +414,16 @@ krt_read_ifinfo(struct ks_msg *msg)
|
||||||
struct iface *iface = NULL, f;
|
struct iface *iface = NULL, f;
|
||||||
int fl = ifm->ifm_flags;
|
int fl = ifm->ifm_flags;
|
||||||
|
|
||||||
for(i = 1; i!=0; i <<= 1)
|
for (i = 1; i<=RTA_IFP; i <<= 1)
|
||||||
{
|
{
|
||||||
if((i & ifm->ifm_addrs) && (i == RTA_IFP))
|
if (i & ifm->ifm_addrs)
|
||||||
{
|
{
|
||||||
if (i == RTA_IFP)
|
if (i == RTA_IFP)
|
||||||
{
|
{
|
||||||
dl = (struct sockaddr_dl *)body;
|
dl = (struct sockaddr_dl *)body;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
body += ROUNDUP(((struct sockaddr *)&(body))->sa_len);\
|
body += ROUNDUP(((struct sockaddr *)&(body))->sa_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue