PR: kern/56343
Reviewed by: tjr Approved by: jake (mentor)
This commit is contained in:
parent
5435c30066
commit
8a538743b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119705
@ -830,7 +830,9 @@ udp_output(inp, m, addr, control, td)
|
||||
* Set up checksum and output datagram.
|
||||
*/
|
||||
if (udpcksum) {
|
||||
ui->ui_sum = in_pseudo(ui->ui_src.s_addr, ui->ui_dst.s_addr,
|
||||
if (inp->inp_flags & INP_ONESBCAST)
|
||||
faddr.s_addr = INADDR_BROADCAST;
|
||||
ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr,
|
||||
htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP));
|
||||
m->m_pkthdr.csum_flags = CSUM_UDP;
|
||||
m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
|
||||
|
Loading…
Reference in New Issue
Block a user