Skip to content
Browse files

net: llmnr: Check that UDP header can be accessed

It is possible that UDP header cannot be accessed so we need
to check that we do not do null pointer dereference.

Coverity-CID: 198866
Fixes #16581

Signed-off-by: Jukka Rissanen <>
  • Loading branch information...
jukkar committed Jun 7, 2019
1 parent 9bd9b75 commit a348c8c61ca076ff1eb07ec66eacf195486306d8
Showing with 3 additions and 0 deletions.
  1. +3 −0 subsys/net/lib/dns/llmnr_responder.c
@@ -68,6 +68,9 @@ static void create_ipv6_dst_addr(struct net_pkt *pkt,
struct net_udp_hdr *udp_hdr, hdr;

udp_hdr = net_udp_get_hdr(pkt, &hdr);
if (!udp_hdr) {

addr->sin6_family = AF_INET6;
addr->sin6_port = udp_hdr->src_port;

0 comments on commit a348c8c

Please sign in to comment.
You can’t perform that action at this time.