• Kubernetes Submit Queue's avatar
    Merge pull request #45642 from JiangtianLi/jiangtli-fixdns2 · f706b810
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Fix the issue in Windows kube-proxy when processing unqualified name. This is for DNS client such as ping or iwr that validate name in response and original question.
    
    **What this PR does / why we need it**:
    This PR is an additional fix to #41618 and [the corresponding commit](https://github.com/kubernetes/kubernetes/commit/b9dfb69dd7679ae31bad1fb4980561fea22f8ed4). The DNS client such as nslookup does not validate name matching in response and original question. That works fine when we append DNS suffix to unqualified name in DNS query in Windows kube-proxy. However, for DNS client such as ping or Invoke-WebRequest that validates name in response and original question, the issue arises and the DNS query fails although the received DNS response has no error. 
    
    This PR fixes the additional issue by restoring the original question name in DNS response. Further, this PR refactors DNS message routines by using miekg's DNS library.
    
    This PR affects the Windows kube-proxy only.
    
    **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #42605 
    
    **Special notes for your reviewer**:
    
    **Release note**:
    
    ```release-note
    Fix DNS suffix search list support in Windows kube-proxy.
    ```
    f706b810
Name
Last commit
Last update
..
config Loading commit data...
healthcheck Loading commit data...
iptables Loading commit data...
userspace Loading commit data...
util Loading commit data...
winuserspace Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
doc.go Loading commit data...
types.go Loading commit data...