Skip to content

Commit

Permalink
Set additional header in DNS message explicitly
Browse files Browse the repository at this point in the history
Some DNS Queries include an optional RR in the additional record section of
DNS, so simply copying the non-zero DNS Header for the additional records, but
not adding any leads to broken DNS packages.

This patch explicitly sets the additional records entry in the DNS header to 0.

Closes #114
Submitted-at: #115
Signed-off-by: Sven Haardiek <sven.haardiek@uni-muenster.de>
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
shaardie authored and numansiddique committed Feb 9, 2022
1 parent 385aedb commit f167c0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ Steve Ruan ruansx@cn.ibm.com
Stuart Cardall developer@it-offshore.co.uk
Sugesh Chandran sugesh.chandran@intel.com
SUGYO Kazushi sugyo.org@gmail.com
Sven Haardiek sven.haardiek@uni-muenster.de
Tadaaki Nagao nagao@stratosphere.co.jp
Terry Wilson twilson@redhat.com
Tetsuo NAKAGAWA nakagawa@mxc.nes.nec.co.jp
Expand Down
3 changes: 2 additions & 1 deletion controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3023,8 +3023,9 @@ pinctrl_handle_dns_lookup(
/* Set the response bit to 1 in the flags. */
out_dns_header->lo_flag |= 0x80;

/* Set the answer RR. */
/* Set the answer RRs. */
out_dns_header->ancount = htons(ancount);
out_dns_header->arcount = 0;

/* Copy the Query section. */
dp_packet_put(&pkt_out, dp_packet_data(pkt_in), dp_packet_size(pkt_in));
Expand Down

0 comments on commit f167c0b

Please sign in to comment.