ip/dhcpd: ignore ipv6 addresses when looking up static binding

This commit is contained in:
cinap_lenrek 2022-03-18 19:54:23 +00:00
parent 488f378470
commit e83917a658

View file

@ -248,9 +248,11 @@ lookup(Bootp *bp, Info *iip, Info *riip)
for(nt = t; nt != nil; nt = nt->entry){
if(strcmp(nt->attr, "ip") != 0)
continue;
if(parseip(ciaddr, nt->val) == -1)
if(parseip(ciaddr, nt->val) == -1 || !isv4(ciaddr))
continue;
if(!validip(ciaddr) || !samenet(ciaddr, riip))
if(!validip(ciaddr))
continue;
if(!samenet(ciaddr, riip))
continue;
if(lookupip(ciaddr, hwattr, hwval, iip, 0) < 0)
continue;