ip/dhcpd: ignore ipv6 addresses when looking up static binding
This commit is contained in:
parent
488f378470
commit
e83917a658
1 changed files with 4 additions and 2 deletions
|
@ -248,9 +248,11 @@ lookup(Bootp *bp, Info *iip, Info *riip)
|
||||||
for(nt = t; nt != nil; nt = nt->entry){
|
for(nt = t; nt != nil; nt = nt->entry){
|
||||||
if(strcmp(nt->attr, "ip") != 0)
|
if(strcmp(nt->attr, "ip") != 0)
|
||||||
continue;
|
continue;
|
||||||
if(parseip(ciaddr, nt->val) == -1)
|
if(parseip(ciaddr, nt->val) == -1 || !isv4(ciaddr))
|
||||||
continue;
|
continue;
|
||||||
if(!validip(ciaddr) || !samenet(ciaddr, riip))
|
if(!validip(ciaddr))
|
||||||
|
continue;
|
||||||
|
if(!samenet(ciaddr, riip))
|
||||||
continue;
|
continue;
|
||||||
if(lookupip(ciaddr, hwattr, hwval, iip, 0) < 0)
|
if(lookupip(ciaddr, hwattr, hwval, iip, 0) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue