netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: netfilter: nfnetlink_log: send complete hardware header
@ 2010-07-22 11:50 Dan Carpenter
  2010-07-22 12:09 ` [PATCH] netfilter: nfnetlink_log: Fix potential problem if skb->dev is null Eric Leblond
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-07-22 11:50 UTC (permalink / raw)
  To: eric; +Cc: netfilter-devel

Hi,

Smatch complains abbout 72961ecf84d67d6 "netfilter: nfnetlink_log: send
complete hardware header" which is net-next.
    
   462          if (indev && skb->dev) {
                             ^^^^^^^^
	skb->dev can be NULL here.

   463                  struct nfulnl_msg_packet_hw phw;
   464                  int len = dev_parse_header(skb, phw.hw_addr);
   465                  if (len > 0) {
   466                          phw.hw_addrlen = htons(len);
   467                          NLA_PUT(inst->skb, NFULA_HWADDR, sizeof(phw), &phw);
   468                  }
   469          }
   470  
   471          if (indev && skb_mac_header_was_set(skb)) {
   472                  NLA_PUT_BE16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type));
                                                                    ^^^^^^^^
	It's dereferenced here.

   473                  NLA_PUT_BE16(inst->skb, NFULA_HWLEN,
   474                               htons(skb->dev->hard_header_len));

I'm not sure how you want to deal with this.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-22 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 11:50 netfilter: nfnetlink_log: send complete hardware header Dan Carpenter
2010-07-22 12:09 ` [PATCH] netfilter: nfnetlink_log: Fix potential problem if skb->dev is null Eric Leblond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).