• rwappler's avatar
    resolver-conf: prevent hostname spoofing · 40b1e199
    rwappler authored and Martin Matějek's avatar Martin Matějek committed
    - when a client requests a dhcp lease but does not provide a hostname,
      then the dhcp-script.sh does not provide a hostname. That results in
      using the HOSTNAME variable from the environment, containing the
      hostname of the resolver, finally resulting in an additional A-Record
      with another IP adress. The router then may become unreachable
    - Fix is, to read the configured hostname via uci and consider it as an
      invalid one.
    
    Fixed
    - Do not set hostname of the router to dhcp lease, which does not
      provide its own hostname.
    
    Closes: #871
    
    
    
    Co-authored-by: Martin Matějek's avatarMartin Matějek <martin.matejek@nic.cz>
    40b1e199